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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 889463003: GURL::Replacements methods accept a StringPiece instead of std::string&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (fixed some merge conflicts). Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index 833d3bbe58e9c59f13c303182049a4f73b8fe120..98e5562854173e8b5d5633d9731971be25a67408 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -558,11 +558,8 @@ void StartPageService::UnloadContents() {
}
void StartPageService::FetchDoodleJson() {
- // SetPathStr() requires its argument to stay in scope as long as
- // |replacements| is, so a std::string is needed, instead of a char*.
- std::string path = kDoodleJsonPath;
GURL::Replacements replacements;
- replacements.SetPathStr(path);
+ replacements.SetPathStr(kDoodleJsonPath);
GURL google_base_url(UIThreadSearchTermsData(profile_).GoogleBaseURLValue());
GURL doodle_url = google_base_url.ReplaceComponents(replacements);

Powered by Google App Engine
This is Rietveld 408576698