Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4550)

Unified Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 7044071: Rewrite BrowserTest.PageLanguageDetection to use a new tab instead of the one with about:blank. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/test/data/extensions/api_test/tabs/basics/crud.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_view_observer.cc
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc
index 3ae0ce6da29ef33c8c3d137a53bfdf4c0b3d05d2..98f6c7361bd57db295109e594ade7f950df42d67 100644
--- a/chrome/renderer/chrome_render_view_observer.cc
+++ b/chrome/renderer/chrome_render_view_observer.cc
@@ -505,9 +505,9 @@ void ChromeRenderViewObserver::CapturePageInfo(int load_id,
// Retrieve the frame's full text.
string16 contents;
CaptureText(main_frame, &contents);
+ if (translate_helper_)
+ translate_helper_->PageCaptured(contents);
if (contents.size()) {
- if (translate_helper_)
- translate_helper_->PageCaptured(contents);
// Send the text to the browser for indexing (the browser might decide not
// to index, if the URL is HTTPS for instance) and language discovery.
Send(new ViewHostMsg_PageContents(routing_id(), url, load_id, contents));
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/test/data/extensions/api_test/tabs/basics/crud.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698