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

Unified Diff: chrome/browser/search_engines/search_terms_data.cc

Issue 8573021: chrome: Remove 14 exit time destructors and 2 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hopefully fix problems seen on the bots 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
Index: chrome/browser/search_engines/search_terms_data.cc
diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc
index c7aa887666d51d301fa8ad7233b2eaed45261934..5a06cc363750c9a173ca1069b861481d638d76e8 100644
--- a/chrome/browser/search_engines/search_terms_data.cc
+++ b/chrome/browser/search_engines/search_terms_data.cc
@@ -33,7 +33,10 @@ std::string SearchTermsData::GoogleBaseSuggestURLValue() const {
GURL::Replacements repl;
// Replace any existing path with "/complete/".
- static const std::string suggest_path("/complete/");
+ // SetPathStr() requires its argument to stay in scope as long as |repl| is,
+ // so "/complete/" can't be passed to SetPathStr() directly, it needs to be in
+ // a variable.
+ const std::string suggest_path("/complete/");
repl.SetPathStr(suggest_path);
// Clear the query and ref.

Powered by Google App Engine
This is Rietveld 408576698