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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 CloudPrintSetupSource::CloudPrintSetupSource() { | 43 CloudPrintSetupSource::CloudPrintSetupSource() { |
44 } | 44 } |
45 | 45 |
46 std::string CloudPrintSetupSource::GetSource() const { | 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 int render_process_id, |
| 53 int render_view_id, |
53 const content::URLDataSource::GotDataCallback& callback) { | 54 const content::URLDataSource::GotDataCallback& callback) { |
54 const char kCloudPrintSetupPath[] = "cloudprintsetup"; | 55 const char kCloudPrintSetupPath[] = "cloudprintsetup"; |
55 const char kCloudPrintGaiaLoginPath[] = "gaialogin"; | 56 const char kCloudPrintGaiaLoginPath[] = "gaialogin"; |
56 const char kCloudPrintSetupFlowPath[] = "setupflow"; | 57 const char kCloudPrintSetupFlowPath[] = "setupflow"; |
57 const char kCloudPrintSetupDonePath[] = "setupdone"; | 58 const char kCloudPrintSetupDonePath[] = "setupdone"; |
58 | 59 |
59 DictionaryValue localized_strings; | 60 DictionaryValue localized_strings; |
60 DictionaryValue* dict = &localized_strings; | 61 DictionaryValue* dict = &localized_strings; |
61 | 62 |
62 std::string response; | 63 std::string response; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return false; | 139 return false; |
139 } | 140 } |
140 | 141 |
141 std::string CloudPrintSetupSource::GetLocalizedUrl( | 142 std::string CloudPrintSetupSource::GetLocalizedUrl( |
142 const std::string& url) const { | 143 const std::string& url) const { |
143 GURL original_url(url); | 144 GURL original_url(url); |
144 DCHECK(original_url.is_valid()); | 145 DCHECK(original_url.is_valid()); |
145 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); | 146 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); |
146 return localized_url.spec(); | 147 return localized_url.spec(); |
147 } | 148 } |
OLD | NEW |