summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-20 22:04:48 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-20 22:04:48 +0000
commit09cff78781a7bfc6858544b0bd754300eb000bbb (patch)
treeed81b0c8d63d755ee720a1f8b9bde267b3cbd260 /cloud_print
parentb897d5caed9c84579564d4a6d8b864776931616a (diff)
downloadchromium_src-09cff78781a7bfc6858544b0bd754300eb000bbb.zip
chromium_src-09cff78781a7bfc6858544b0bd754300eb000bbb.tar.gz
chromium_src-09cff78781a7bfc6858544b0bd754300eb000bbb.tar.bz2
Moved CloudPrintUrl to components/cloud_devices/cloud_devices_urls.h.
Removed unused cloud print prefs. TBR=jochen, rogerta Review URL: https://codereview.chromium.org/240283010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/DEPS1
-rw-r--r--cloud_print/service/service.gyp1
-rw-r--r--cloud_print/service/win/chrome_launcher.cc25
-rw-r--r--cloud_print/service/win/service_utils.cc3
4 files changed, 7 insertions, 23 deletions
diff --git a/cloud_print/DEPS b/cloud_print/DEPS
index 88a5403..25918c1 100644
--- a/cloud_print/DEPS
+++ b/cloud_print/DEPS
@@ -1,6 +1,7 @@
include_rules = [
"+chrome/common",
"+chrome/installer/launcher_support",
+ "+components/cloud_devices/common",
"+google_apis",
"+grit",
"+jingle/notifier",
diff --git a/cloud_print/service/service.gyp b/cloud_print/service/service.gyp
index f4bc65b..04d612d 100644
--- a/cloud_print/service/service.gyp
+++ b/cloud_print/service/service.gyp
@@ -54,6 +54,7 @@
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/base.gyp:base_static',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '<(DEPTH)/components/components.gyp:cloud_devices_common',
'<(DEPTH)/google_apis/google_apis.gyp:google_apis',
'<(DEPTH)/ipc/ipc.gyp:ipc',
'<(DEPTH)/net/net.gyp:net',
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index 231ae84..650b502 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -23,6 +23,7 @@
#include "cloud_print/common/win/cloud_print_utils.h"
#include "cloud_print/service/service_constants.h"
#include "cloud_print/service/win/service_utils.h"
+#include "components/cloud_devices/common/cloud_devices_urls.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
@@ -91,27 +92,6 @@ bool LaunchProcess(const CommandLine& cmdline,
return true;
}
-GURL GetCloudPrintServiceEnableURL(const std::string& proxy_id) {
- GURL url(
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kCloudPrintServiceURL));
- if (url.is_empty())
- url = GURL("https://www.google.com/cloudprint");
- url = net::AppendQueryParameter(url, "proxy", proxy_id);
- std::string url_path(url.path() + "/enable_chrome_connector/enable.html");
- GURL::Replacements replacements;
- replacements.SetPathStr(url_path);
- return url.ReplaceComponents(replacements);
-}
-
-GURL GetCloudPrintServiceEnableURLWithSignin(const std::string& proxy_id) {
- GURL url(GaiaUrls::GetInstance()->service_login_url());
- url = net::AppendQueryParameter(url, "service", "cloudprint");
- url = net::AppendQueryParameter(url, "sarp", "1");
- return net::AppendQueryParameter(
- url, "continue", GetCloudPrintServiceEnableURL(proxy_id).spec());
-}
-
std::string ReadAndUpdateServiceState(const base::FilePath& directory,
const std::string& proxy_id) {
std::string json;
@@ -311,7 +291,8 @@ std::string ChromeLauncher::CreateServiceStateFile(
cmd.AppendSwitch(switches::kNoDefaultBrowserCheck);
cmd.AppendSwitch(switches::kNoFirstRun);
- cmd.AppendArg(GetCloudPrintServiceEnableURLWithSignin(proxy_id).spec());
+ cmd.AppendArg(
+ cloud_devices::GetCloudPrintEnableURLWithSignin(proxy_id).spec());
base::win::ScopedHandle chrome_handle;
DWORD thread_id = 0;
diff --git a/cloud_print/service/win/service_utils.cc b/cloud_print/service/win/service_utils.cc
index 2d1d3a4..b71bca2 100644
--- a/cloud_print/service/win/service_utils.cc
+++ b/cloud_print/service/win/service_utils.cc
@@ -11,6 +11,7 @@
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "chrome/common/chrome_switches.h"
+#include "components/cloud_devices/common/cloud_devices_switches.h"
base::string16 GetLocalComputerName() {
DWORD size = 0;
@@ -49,7 +50,7 @@ base::string16 GetCurrentUserName() {
void CopyChromeSwitchesFromCurrentProcess(CommandLine* destination) {
static const char* const kSwitchesToCopy[] = {
- switches::kCloudPrintServiceURL,
+ switches::kCloudPrintURL,
switches::kCloudPrintXmppEndpoint,
switches::kEnableCloudPrintXps,
switches::kEnableLogging,