OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_setup_source.h" | 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_source.h" |
6 | 6 |
7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const std::string& key, | 36 const std::string& key, |
37 int resource_id) { | 37 int resource_id) { |
38 dictionary->SetString(key, l10n_util::GetStringUTF16(resource_id)); | 38 dictionary->SetString(key, l10n_util::GetStringUTF16(resource_id)); |
39 } | 39 } |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 CloudPrintSetupSource::CloudPrintSetupSource() { | 43 CloudPrintSetupSource::CloudPrintSetupSource() { |
44 } | 44 } |
45 | 45 |
46 std::string CloudPrintSetupSource::GetSource() { | 46 std::string CloudPrintSetupSource::GetSource() const { |
47 return chrome::kChromeUICloudPrintSetupHost; | 47 return chrome::kChromeUICloudPrintSetupHost; |
48 } | 48 } |
49 | 49 |
50 void CloudPrintSetupSource::StartDataRequest( | 50 void CloudPrintSetupSource::StartDataRequest( |
51 const std::string& path_raw, | 51 const std::string& path_raw, |
52 bool is_incognito, | 52 bool is_incognito, |
53 const content::URLDataSource::GotDataCallback& callback) { | 53 const content::URLDataSource::GotDataCallback& callback) { |
54 const char kCloudPrintSetupPath[] = "cloudprintsetup"; | 54 const char kCloudPrintSetupPath[] = "cloudprintsetup"; |
55 const char kCloudPrintGaiaLoginPath[] = "gaialogin"; | 55 const char kCloudPrintGaiaLoginPath[] = "gaialogin"; |
56 const char kCloudPrintSetupFlowPath[] = "setupflow"; | 56 const char kCloudPrintSetupFlowPath[] = "setupflow"; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return false; | 138 return false; |
139 } | 139 } |
140 | 140 |
141 std::string CloudPrintSetupSource::GetLocalizedUrl( | 141 std::string CloudPrintSetupSource::GetLocalizedUrl( |
142 const std::string& url) const { | 142 const std::string& url) const { |
143 GURL original_url(url); | 143 GURL original_url(url); |
144 DCHECK(original_url.is_valid()); | 144 DCHECK(original_url.is_valid()); |
145 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); | 145 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); |
146 return localized_url.spec(); | 146 return localized_url.spec(); |
147 } | 147 } |
OLD | NEW |