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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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) 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/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 10 matching lines...) Expand all
21 // cloud_print_app/manifest.json. If it's matched, print driver dialog will 21 // cloud_print_app/manifest.json. If it's matched, print driver dialog will
22 // open sign-in page in separate window. 22 // open sign-in page in separate window.
23 const char kDefaultCloudPrintServiceURL[] = "https://www.google.com/cloudprint"; 23 const char kDefaultCloudPrintServiceURL[] = "https://www.google.com/cloudprint";
24 24
25 const char kLearnMoreURL[] = 25 const char kLearnMoreURL[] =
26 "https://www.google.com/support/cloudprint"; 26 "https://www.google.com/support/cloudprint";
27 const char kTestPageURL[] = 27 const char kTestPageURL[] =
28 "http://www.google.com/landing/cloudprint/enable.html?print=true"; 28 "http://www.google.com/landing/cloudprint/enable.html?print=true";
29 29
30 // static 30 // static
31 void CloudPrintURL::RegisterUserPrefs( 31 void CloudPrintURL::RegisterProfilePrefs(
32 user_prefs::PrefRegistrySyncable* registry) { 32 user_prefs::PrefRegistrySyncable* registry) {
33 registry->RegisterStringPref( 33 registry->RegisterStringPref(
34 prefs::kCloudPrintServiceURL, 34 prefs::kCloudPrintServiceURL,
35 kDefaultCloudPrintServiceURL, 35 kDefaultCloudPrintServiceURL,
36 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 36 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
37 std::string url = GaiaUrls::GetInstance()->service_login_url(); 37 std::string url = GaiaUrls::GetInstance()->service_login_url();
38 url.append("?service=cloudprint&sarp=1&continue="); 38 url.append("?service=cloudprint&sarp=1&continue=");
39 url.append(net::EscapeQueryParamValue(kDefaultCloudPrintServiceURL, false)); 39 url.append(net::EscapeQueryParamValue(kDefaultCloudPrintServiceURL, false));
40 registry->RegisterStringPref( 40 registry->RegisterStringPref(
41 prefs::kCloudPrintSigninURL, 41 prefs::kCloudPrintSigninURL,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 GURL CloudPrintURL::GetCloudPrintLearnMoreURL() { 104 GURL CloudPrintURL::GetCloudPrintLearnMoreURL() {
105 GURL cloud_print_learn_more_url(kLearnMoreURL); 105 GURL cloud_print_learn_more_url(kLearnMoreURL);
106 return cloud_print_learn_more_url; 106 return cloud_print_learn_more_url;
107 } 107 }
108 108
109 GURL CloudPrintURL::GetCloudPrintTestPageURL() { 109 GURL CloudPrintURL::GetCloudPrintTestPageURL() {
110 GURL cloud_print_learn_more_url(kTestPageURL); 110 GURL cloud_print_learn_more_url(kTestPageURL);
111 return cloud_print_learn_more_url; 111 return cloud_print_learn_more_url;
112 } 112 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_url.h ('k') | chrome/browser/printing/print_dialog_cloud.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698