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_setup_source.h" | 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // Utility method to keep dictionary population code streamlined. | 33 // Utility method to keep dictionary population code streamlined. |
34 void AddString(DictionaryValue* dictionary, | 34 void AddString(DictionaryValue* dictionary, |
35 const std::string& key, | 35 const std::string& key, |
36 int resource_id) { | 36 int resource_id) { |
37 dictionary->SetString(key, l10n_util::GetStringUTF16(resource_id)); | 37 dictionary->SetString(key, l10n_util::GetStringUTF16(resource_id)); |
38 } | 38 } |
39 | 39 |
40 } // namespace | 40 } // namespace |
41 | 41 |
42 CloudPrintSetupSource::CloudPrintSetupSource() | 42 CloudPrintSetupSource::CloudPrintSetupSource() |
43 : DataSource(chrome::kCloudPrintSetupHost, MessageLoop::current()) { | 43 : DataSource(chrome::kChromeUICloudPrintSetupHost, MessageLoop::current()) { |
44 } | 44 } |
45 | 45 |
46 void CloudPrintSetupSource::StartDataRequest(const std::string& path_raw, | 46 void CloudPrintSetupSource::StartDataRequest(const std::string& path_raw, |
47 bool is_incognito, | 47 bool is_incognito, |
48 int request_id) { | 48 int request_id) { |
49 const char kCloudPrintSetupPath[] = "cloudprintsetup"; | 49 const char kCloudPrintSetupPath[] = "cloudprintsetup"; |
50 const char kCloudPrintGaiaLoginPath[] = "gaialogin"; | 50 const char kCloudPrintGaiaLoginPath[] = "gaialogin"; |
51 const char kCloudPrintSetupFlowPath[] = "setupflow"; | 51 const char kCloudPrintSetupFlowPath[] = "setupflow"; |
52 const char kCloudPrintSetupDonePath[] = "setupdone"; | 52 const char kCloudPrintSetupDonePath[] = "setupdone"; |
53 | 53 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return "text/html"; | 130 return "text/html"; |
131 } | 131 } |
132 | 132 |
133 std::string CloudPrintSetupSource::GetLocalizedUrl( | 133 std::string CloudPrintSetupSource::GetLocalizedUrl( |
134 const std::string& url) const { | 134 const std::string& url) const { |
135 GURL original_url(url); | 135 GURL original_url(url); |
136 DCHECK(original_url.is_valid()); | 136 DCHECK(original_url.is_valid()); |
137 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); | 137 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); |
138 return localized_url.spec(); | 138 return localized_url.spec(); |
139 } | 139 } |
OLD | NEW |