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

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

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. Created 7 years, 8 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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_setup_source.h ('k') | chrome/browser/search/local_ntp_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698