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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_url.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/printing/cloud_print/cloud_print_url.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_url.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return cloud_print_manage_url; 83 return cloud_print_manage_url;
84 } 84 }
85 85
86 GURL CloudPrintURL::GetCloudPrintServiceEnableURL( 86 GURL CloudPrintURL::GetCloudPrintServiceEnableURL(
87 const std::string& proxy_id) { 87 const std::string& proxy_id) {
88 GURL cloud_print_service_url = GetCloudPrintServiceURL(); 88 GURL cloud_print_service_url = GetCloudPrintServiceURL();
89 std::string path(cloud_print_service_url.path() + 89 std::string path(cloud_print_service_url.path() +
90 "/enable_chrome_connector/enable.html"); 90 "/enable_chrome_connector/enable.html");
91 GURL::Replacements replacements; 91 GURL::Replacements replacements;
92 replacements.SetPathStr(path); 92 replacements.SetPathStr(path);
93 std::string query = StringPrintf("proxy=%s", proxy_id.c_str()); 93 std::string query = base::StringPrintf("proxy=%s", proxy_id.c_str());
94 replacements.SetQueryStr(query); 94 replacements.SetQueryStr(query);
95 GURL cloud_print_enable_url = cloud_print_service_url.ReplaceComponents( 95 GURL cloud_print_enable_url = cloud_print_service_url.ReplaceComponents(
96 replacements); 96 replacements);
97 return cloud_print_enable_url; 97 return cloud_print_enable_url;
98 } 98 }
99 99
100 GURL CloudPrintURL::GetCloudPrintLearnMoreURL() { 100 GURL CloudPrintURL::GetCloudPrintLearnMoreURL() {
101 GURL cloud_print_learn_more_url(kLearnMoreURL); 101 GURL cloud_print_learn_more_url(kLearnMoreURL);
102 return cloud_print_learn_more_url; 102 return cloud_print_learn_more_url;
103 } 103 }
104 104
105 GURL CloudPrintURL::GetCloudPrintTestPageURL() { 105 GURL CloudPrintURL::GetCloudPrintTestPageURL() {
106 GURL cloud_print_learn_more_url(kTestPageURL); 106 GURL cloud_print_learn_more_url(kTestPageURL);
107 return cloud_print_learn_more_url; 107 return cloud_print_learn_more_url;
108 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698