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

Side by Side Diff: chrome/browser/predictors/autocomplete_action_predictor.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/predictors/autocomplete_action_predictor.h" 5 #include "chrome/browser/predictors/autocomplete_action_predictor.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const content::SessionStorageNamespaceMap& session_storage_namespace_map, 141 const content::SessionStorageNamespaceMap& session_storage_namespace_map,
142 const gfx::Size& size) { 142 const gfx::Size& size) {
143 // Only cancel the old prerender after starting the new one, so if the URLs 143 // Only cancel the old prerender after starting the new one, so if the URLs
144 // are the same, the underlying prerender will be reused. 144 // are the same, the underlying prerender will be reused.
145 scoped_ptr<prerender::PrerenderHandle> old_prerender_handle( 145 scoped_ptr<prerender::PrerenderHandle> old_prerender_handle(
146 prerender_handle_.release()); 146 prerender_handle_.release());
147 if (prerender::PrerenderManager* prerender_manager = 147 if (prerender::PrerenderManager* prerender_manager =
148 prerender::PrerenderManagerFactory::GetForProfile(profile_)) { 148 prerender::PrerenderManagerFactory::GetForProfile(profile_)) {
149 content::SessionStorageNamespace* session_storage_namespace = NULL; 149 content::SessionStorageNamespace* session_storage_namespace = NULL;
150 content::SessionStorageNamespaceMap::const_iterator it = 150 content::SessionStorageNamespaceMap::const_iterator it =
151 session_storage_namespace_map.find(""); 151 session_storage_namespace_map.find(std::string());
152 if (it != session_storage_namespace_map.end()) 152 if (it != session_storage_namespace_map.end())
153 session_storage_namespace = it->second; 153 session_storage_namespace = it->second;
154 prerender_handle_.reset( 154 prerender_handle_.reset(
155 prerender_manager->AddPrerenderFromOmnibox( 155 prerender_manager->AddPrerenderFromOmnibox(
156 url, session_storage_namespace, size)); 156 url, session_storage_namespace, size));
157 } 157 }
158 if (old_prerender_handle) 158 if (old_prerender_handle)
159 old_prerender_handle->OnCancel(); 159 old_prerender_handle->OnCancel();
160 } 160 }
161 161
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 return number_of_hits / (number_of_hits + value.number_of_misses); 577 return number_of_hits / (number_of_hits + value.number_of_misses);
578 } 578 }
579 579
580 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { 580 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() {
581 } 581 }
582 582
583 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { 583 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() {
584 } 584 }
585 585
586 } // namespace predictors 586 } // namespace predictors
OLDNEW
« no previous file with comments | « chrome/browser/popup_blocker_browsertest.cc ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698