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

Unified Diff: chrome/renderer/safe_browsing/phishing_classifier_delegate.cc

Issue 8404018: chrome.loadTimes() shouldn't be affected by in-document navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge Created 9 years, 1 month 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/renderer/prerender/prerender_helper.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/safe_browsing/phishing_classifier_delegate.cc
diff --git a/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc b/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc
index 9a224fa99db1a601b4372b1dc5a747277726c8f1..e2f74ea30912cfd739fc783e3243ef763d6141bd 100644
--- a/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc
+++ b/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc
@@ -16,6 +16,7 @@
#include "chrome/renderer/safe_browsing/feature_extractor_clock.h"
#include "chrome/renderer/safe_browsing/phishing_classifier.h"
#include "chrome/renderer/safe_browsing/scorer.h"
+#include "content/public/renderer/document_state.h"
#include "content/public/renderer/navigation_state.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
@@ -24,6 +25,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
+using content::DocumentState;
using content::NavigationState;
using content::RenderThread;
@@ -149,12 +151,13 @@ void PhishingClassifierDelegate::DidCommitProvisionalLoad(
// this case, we need to properly deal with the fact that PageCaptured will
// be called again for the in-page navigation. We need to be sure not to
// swap out the page text while the term feature extractor is still running.
- NavigationState* state = NavigationState::FromDataSource(
+ DocumentState* document_state = DocumentState::FromDataSource(
frame->dataSource());
- CancelPendingClassification(state->was_within_same_page() ?
+ NavigationState* navigation_state = document_state->navigation_state();
+ CancelPendingClassification(navigation_state->was_within_same_page() ?
NAVIGATE_WITHIN_PAGE : NAVIGATE_AWAY);
if (frame == render_view()->GetWebView()->mainFrame()) {
- last_main_frame_transition_ = state->transition_type();
+ last_main_frame_transition_ = navigation_state->transition_type();
}
}
« no previous file with comments | « chrome/renderer/prerender/prerender_helper.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698