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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reabase for fixing instant. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" 5 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 // It's possible the tab strip does not have an active tab contents, for 1151 // It's possible the tab strip does not have an active tab contents, for
1152 // instance if the tab has been closed or on return from a sleep state 1152 // instance if the tab has been closed or on return from a sleep state
1153 // (http://crbug.com/105689) 1153 // (http://crbug.com/105689)
1154 TabContents* tab = controller_->GetTabContents(); 1154 TabContents* tab = controller_->GetTabContents();
1155 if (!tab) 1155 if (!tab)
1156 return; 1156 return;
1157 gfx::Rect container_bounds; 1157 gfx::Rect container_bounds;
1158 tab->web_contents()->GetView()->GetContainerBounds(&container_bounds); 1158 tab->web_contents()->GetView()->GetContainerBounds(&container_bounds);
1159 AutocompleteActionPredictorFactory::GetForProfile(profile_)-> 1159 AutocompleteActionPredictorFactory::GetForProfile(profile_)->
1160 StartPrerendering(match.destination_url, 1160 StartPrerendering(match.destination_url,
1161 tab->web_contents()->GetRenderViewHost()-> 1161 tab->web_contents()->GetController()
1162 GetSessionStorageNamespace(), 1162 .GetSessionStorageNamespaceMap(),
1163 container_bounds.size()); 1163 container_bounds.size());
1164 } 1164 }
1165 1165
1166 void OmniboxEditModel::DoPreconnect(const AutocompleteMatch& match) { 1166 void OmniboxEditModel::DoPreconnect(const AutocompleteMatch& match) {
1167 if (!match.destination_url.SchemeIs(chrome::kExtensionScheme)) { 1167 if (!match.destination_url.SchemeIs(chrome::kExtensionScheme)) {
1168 // Warm up DNS Prefetch cache, or preconnect to a search service. 1168 // Warm up DNS Prefetch cache, or preconnect to a search service.
1169 UMA_HISTOGRAM_ENUMERATION("Autocomplete.MatchType", match.type, 1169 UMA_HISTOGRAM_ENUMERATION("Autocomplete.MatchType", match.type,
1170 AutocompleteMatch::NUM_TYPES); 1170 AutocompleteMatch::NUM_TYPES);
1171 if (profile_->GetNetworkPredictor()) { 1171 if (profile_->GetNetworkPredictor()) {
1172 profile_->GetNetworkPredictor()->AnticipateOmniboxUrl( 1172 profile_->GetNetworkPredictor()->AnticipateOmniboxUrl(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 } 1205 }
1206 1206
1207 void OmniboxEditModel::ClassifyStringForPasteAndGo( 1207 void OmniboxEditModel::ClassifyStringForPasteAndGo(
1208 const string16& text, 1208 const string16& text,
1209 AutocompleteMatch* match, 1209 AutocompleteMatch* match,
1210 GURL* alternate_nav_url) const { 1210 GURL* alternate_nav_url) const {
1211 DCHECK(match); 1211 DCHECK(match);
1212 AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(text, 1212 AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(text,
1213 string16(), false, false, match, alternate_nav_url); 1213 string16(), false, false, match, alternate_nav_url);
1214 } 1214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698