| 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.
|
|
|