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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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
« no previous file with comments | « chrome/browser/aeropeek_manager.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/autocomplete/autocomplete_edit.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 return; 1111 return;
1112 // It's possible the tab strip does not have an active tab contents, for 1112 // It's possible the tab strip does not have an active tab contents, for
1113 // instance if the tab has been closed or on return from a sleep state 1113 // instance if the tab has been closed or on return from a sleep state
1114 // (http://crbug.com/105689) 1114 // (http://crbug.com/105689)
1115 TabContentsWrapper* tab = controller_->GetTabContentsWrapper(); 1115 TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
1116 if (!tab) 1116 if (!tab)
1117 return; 1117 return;
1118 prerender::PrerenderManager* prerender_manager = 1118 prerender::PrerenderManager* prerender_manager =
1119 prerender::PrerenderManagerFactory::GetForProfile(tab->profile()); 1119 prerender::PrerenderManagerFactory::GetForProfile(tab->profile());
1120 if (prerender_manager) { 1120 if (prerender_manager) {
1121 RenderViewHost* current_host = tab->web_contents()->GetRenderViewHost(); 1121 content::RenderViewHost* current_host =
1122 tab->web_contents()->GetRenderViewHost();
1122 prerender_manager->AddPrerenderFromOmnibox( 1123 prerender_manager->AddPrerenderFromOmnibox(
1123 match.destination_url, current_host->GetSessionStorageNamespace()); 1124 match.destination_url, current_host->GetSessionStorageNamespace());
1124 } 1125 }
1125 } 1126 }
1126 1127
1127 void AutocompleteEditModel::DoPreconnect(const AutocompleteMatch& match) { 1128 void AutocompleteEditModel::DoPreconnect(const AutocompleteMatch& match) {
1128 if (!match.destination_url.SchemeIs(chrome::kExtensionScheme)) { 1129 if (!match.destination_url.SchemeIs(chrome::kExtensionScheme)) {
1129 // Warm up DNS Prefetch cache, or preconnect to a search service. 1130 // Warm up DNS Prefetch cache, or preconnect to a search service.
1130 UMA_HISTOGRAM_ENUMERATION("Autocomplete.MatchType", match.type, 1131 UMA_HISTOGRAM_ENUMERATION("Autocomplete.MatchType", match.type,
1131 AutocompleteMatch::NUM_TYPES); 1132 AutocompleteMatch::NUM_TYPES);
(...skipping 11 matching lines...) Expand all
1143 // static 1144 // static
1144 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) { 1145 bool AutocompleteEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) {
1145 switch (c) { 1146 switch (c) {
1146 case 0x0020: // Space 1147 case 0x0020: // Space
1147 case 0x3000: // Ideographic Space 1148 case 0x3000: // Ideographic Space
1148 return true; 1149 return true;
1149 default: 1150 default:
1150 return false; 1151 return false;
1151 } 1152 }
1152 } 1153 }
OLDNEW
« no previous file with comments | « chrome/browser/aeropeek_manager.cc ('k') | chrome/browser/autofill/autofill_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698