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

Unified Diff: chrome/browser/search/most_visited_iframe_source.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 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/most_visited_iframe_source.cc
diff --git a/chrome/browser/search/most_visited_iframe_source.cc b/chrome/browser/search/most_visited_iframe_source.cc
index 7dbb0497273480b4c47cce414e0662a6a76f3576..6eb5e8981581ad70c7e0c37189a52dbd7b221656 100644
--- a/chrome/browser/search/most_visited_iframe_source.cc
+++ b/chrome/browser/search/most_visited_iframe_source.cc
@@ -49,12 +49,12 @@ void MostVisitedIframeSource::StartDataRequest(
const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
const content::URLDataSource::GotDataCallback& callback) {
GURL url(chrome::kChromeSearchMostVisitedUrl + path_and_query);
- std::string path(url.path());
+ base::StringPiece path(url.path());
#if !defined(GOOGLE_CHROME_BUILD)
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kLocalNtpReload)) {
- std::string rel_path = "most_visited_" + path.substr(1);
+ std::string rel_path = "most_visited_" + path.substr(1).as_string();
if (path == kSingleJSPath) {
std::string origin;
if (!GetOrigin(wc_getter, &origin)) {
« no previous file with comments | « chrome/browser/search/iframe_source.cc ('k') | chrome/browser/supervised_user/supervised_user_url_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698