diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 01:59:20 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 01:59:20 +0000 |
commit | 89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7 (patch) | |
tree | e893a2df5a13287114ac5e9411088e4e15677dea /chrome/browser/tab_contents/tab_contents.cc | |
parent | 8df1420fda46cf3dcfd8c4a6cb67446d92e81309 (diff) | |
download | chromium_src-89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7.zip chromium_src-89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7.tar.gz chromium_src-89f0e7493eb6d5a1a8001e975d0b1c45c47e9fc7.tar.bz2 |
Revert 36442 - Still causing test failures
4th attempt at landing this.
It caused several tests to fails previously.
Cannot repro any of the failure. I am suspecting a clobber would have probably fixed it. (there is a change in one of the IPC messages that probably messed up the build somehow).
No code change.
Enabling language detection on page load.
A memory error has been fixed in the CLD library in the meantime.
This should hopefully fixes the crashers in the reliability tests.
Note that this version is actually simpler than the original review since the detection is now performed in the renderer. (So the CLD code runs sandboxed.)
Original review:
http://codereview.chromium.org/492024/show
BUG=30662
TEST=Run the unittests.
TBR=brettw
Review URL: http://codereview.chromium.org/548057
TBR=jcampan@chromium.org
Review URL: http://codereview.chromium.org/536085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index f4bc6d4..fdfa5ab 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1098,6 +1098,10 @@ void TabContents::StopFinding(bool clear_selection) { render_view_host()->StopFinding(clear_selection); } +void TabContents::GetPageLanguage() { + render_view_host()->GetPageLanguage(); +} + void TabContents::OnSavePage() { // If we can not save the page, try to download it. if (!SavePackage::IsSavableContents(contents_mime_type())) { @@ -1756,39 +1760,6 @@ void TabContents::OnDidGetApplicationInfo( delegate()->OnDidGetApplicationInfo(this, page_id); } -void TabContents::OnPageContents(const GURL& url, - int renderer_process_id, - int32 page_id, - const std::wstring& contents, - const std::string& language) { - // Don't index any https pages. People generally don't want their bank - // accounts, etc. indexed on their computer, especially since some of these - // things are not marked cachable. - // TODO(brettw) we may want to consider more elaborate heuristics such as - // the cachability of the page. We may also want to consider subframes (this - // test will still index subframes if the subframe is SSL). - if (!url.SchemeIsSecure()) { - Profile* p = profile(); - if (p && !p->IsOffTheRecord()) { - HistoryService* hs = p->GetHistoryService(Profile::IMPLICIT_ACCESS); - if (hs) - hs->SetPageContents(url, contents); - } - } - - NavigationEntry* entry = controller_.GetActiveEntry(); - if (process()->id() == renderer_process_id && - entry && entry->page_id() == page_id) { - entry->set_language(language); - } - - std::string lang = language; - NotificationService::current()->Notify( - NotificationType::TAB_LANGUAGE_DETERMINED, - Source<RenderViewHost>(render_view_host()), - Details<std::string>(&lang)); -} - void TabContents::DidStartProvisionalLoadForFrame( RenderViewHost* render_view_host, bool is_main_frame, |