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

Unified Diff: chrome/browser/prerender/prerender_local_predictor.cc

Issue 797443002: Remove prerender sessionStorage namespace merging (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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/prerender/prerender_local_predictor.h ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_local_predictor.cc
diff --git a/chrome/browser/prerender/prerender_local_predictor.cc b/chrome/browser/prerender/prerender_local_predictor.cc
index 8c8130a1cc9f6c65a254b083956bb4d41a333625..2dd0a6e81d8b1140e8747232991757bbe4154977 100644
--- a/chrome/browser/prerender/prerender_local_predictor.cc
+++ b/chrome/browser/prerender/prerender_local_predictor.cc
@@ -1524,53 +1524,8 @@ void PrerenderLocalPredictor::OnTabHelperURLSeen(
RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_ENTRY);
if (browser_navigate_initiated)
RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MATCH_BROWSER_NAVIGATE);
- } else {
- SessionStorageNamespace* prerender_session_storage_namespace =
- best_matched_prerender->prerender_handle->
- GetSessionStorageNamespace();
- if (!prerender_session_storage_namespace) {
- RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MISMATCH_NO_NAMESPACE);
- } else {
- RecordEvent(EVENT_TAB_HELPER_URL_SEEN_NAMESPACE_MISMATCH_MERGE_ISSUED);
- prerender_session_storage_namespace->Merge(
- false,
- best_matched_prerender->prerender_handle->GetChildId(),
- tab_session_storage_namespace,
- base::Bind(&PrerenderLocalPredictor::ProcessNamespaceMergeResult,
- weak_factory_.GetWeakPtr()));
- }
}
}
}
-void PrerenderLocalPredictor::ProcessNamespaceMergeResult(
- content::SessionStorageNamespace::MergeResult result) {
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_RECEIVED);
- switch (result) {
- case content::SessionStorageNamespace::MERGE_RESULT_NAMESPACE_NOT_FOUND:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_NAMESPACE_NOT_FOUND);
- break;
- case content::SessionStorageNamespace::MERGE_RESULT_NAMESPACE_NOT_ALIAS:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_NAMESPACE_NOT_ALIAS);
- break;
- case content::SessionStorageNamespace::MERGE_RESULT_NOT_LOGGING:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_NOT_LOGGING);
- break;
- case content::SessionStorageNamespace::MERGE_RESULT_NO_TRANSACTIONS:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_NO_TRANSACTIONS);
- break;
- case content::SessionStorageNamespace::MERGE_RESULT_TOO_MANY_TRANSACTIONS:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_TOO_MANY_TRANSACTIONS);
- break;
- case content::SessionStorageNamespace::MERGE_RESULT_NOT_MERGEABLE:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_NOT_MERGEABLE);
- break;
- case content::SessionStorageNamespace::MERGE_RESULT_MERGEABLE:
- RecordEvent(EVENT_NAMESPACE_MISMATCH_MERGE_RESULT_MERGEABLE);
- break;
- default:
- NOTREACHED();
- }
-}
-
} // namespace prerender
« no previous file with comments | « chrome/browser/prerender/prerender_local_predictor.h ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698