OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |