diff options
author | Ben Murdoch <benm@google.com> | 2014-04-24 10:50:13 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2014-04-24 10:50:13 +0100 |
commit | 0529e5d033099cbfc42635f6f6183833b09dff6e (patch) | |
tree | badea60062e611382d8a37e3b0bfda8d69760c2b /cloud_print | |
parent | 8346740f6fb555ccbb9b4148ab63402ae8f6e4ca (diff) | |
download | chromium_org-0529e5d033099cbfc42635f6f6183833b09dff6e.tar.gz |
Merge from Chromium at DEPS revision 265802
This commit was generated by merge_to_master.py.
Change-Id: I6fac2dbbce472b18ca943b6e6f247835b0bd6281
Diffstat (limited to 'cloud_print')
-rw-r--r-- | cloud_print/DEPS | 1 | ||||
-rw-r--r-- | cloud_print/gcp20/prototype/dns_packet_parser.cc | 1 | ||||
-rw-r--r-- | cloud_print/gcp20/prototype/dns_response_builder.h | 2 | ||||
-rw-r--r-- | cloud_print/service/service.gyp | 1 | ||||
-rw-r--r-- | cloud_print/service/win/chrome_launcher.cc | 25 | ||||
-rw-r--r-- | cloud_print/service/win/service_utils.cc | 4 |
6 files changed, 11 insertions, 23 deletions
diff --git a/cloud_print/DEPS b/cloud_print/DEPS index 88a5403413..25918c1c70 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/gcp20/prototype/dns_packet_parser.cc b/cloud_print/gcp20/prototype/dns_packet_parser.cc index 26cd2e514a..e52ba399e2 100644 --- a/cloud_print/gcp20/prototype/dns_packet_parser.cc +++ b/cloud_print/gcp20/prototype/dns_packet_parser.cc @@ -5,6 +5,7 @@ #include "cloud_print/gcp20/prototype/dns_packet_parser.h" #include "base/big_endian.h" +#include "base/logging.h" DnsPacketParser::DnsPacketParser(const char* packet, size_t length) : packet_(packet), diff --git a/cloud_print/gcp20/prototype/dns_response_builder.h b/cloud_print/gcp20/prototype/dns_response_builder.h index b574ddf1dc..380e2f7200 100644 --- a/cloud_print/gcp20/prototype/dns_response_builder.h +++ b/cloud_print/gcp20/prototype/dns_response_builder.h @@ -9,6 +9,8 @@ #include <vector> #include "base/basictypes.h" +#include "base/memory/ref_counted.h" +#include "net/base/io_buffer.h" #include "net/base/net_util.h" #include "net/dns/dns_protocol.h" diff --git a/cloud_print/service/service.gyp b/cloud_print/service/service.gyp index f4bc65bb67..04d612dc4a 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 231ae84187..650b50209b 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 37f2747b03..b71bca2291 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,8 @@ base::string16 GetCurrentUserName() { void CopyChromeSwitchesFromCurrentProcess(CommandLine* destination) { static const char* const kSwitchesToCopy[] = { - switches::kCloudPrintServiceURL, + switches::kCloudPrintURL, + switches::kCloudPrintXmppEndpoint, switches::kEnableCloudPrintXps, switches::kEnableLogging, switches::kIgnoreUrlFetcherCertRequests, |