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/service/cloud_print/cloud_print_url_fetcher.h" | 5 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/common/cloud_print/cloud_print_constants.h" | 10 #include "chrome/common/cloud_print/cloud_print_constants.h" |
11 #include "chrome/common/cloud_print/cloud_print_helpers.h" | 11 #include "chrome/common/cloud_print/cloud_print_helpers.h" |
12 #include "chrome/service/cloud_print/cloud_print_service_helpers.h" | 12 #include "chrome/service/cloud_print/cloud_print_service_helpers.h" |
13 #include "chrome/service/cloud_print/cloud_print_token_store.h" | 13 #include "chrome/service/cloud_print/cloud_print_token_store.h" |
14 #include "chrome/service/net/service_url_request_context.h" | 14 #include "chrome/service/net/service_url_request_context_getter.h" |
15 #include "chrome/service/service_process.h" | 15 #include "chrome/service/service_process.h" |
16 #include "net/base/load_flags.h" | 16 #include "net/base/load_flags.h" |
17 #include "net/http/http_status_code.h" | 17 #include "net/http/http_status_code.h" |
18 #include "net/url_request/url_fetcher.h" | 18 #include "net/url_request/url_fetcher.h" |
19 #include "net/url_request/url_request_status.h" | 19 #include "net/url_request/url_request_status.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 namespace cloud_print { | 22 namespace cloud_print { |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 ServiceURLRequestContextGetter* getter = | 298 ServiceURLRequestContextGetter* getter = |
299 g_service_process->GetServiceURLRequestContextGetter(); | 299 g_service_process->GetServiceURLRequestContextGetter(); |
300 // Now set up the user agent for cloudprint. | 300 // Now set up the user agent for cloudprint. |
301 std::string user_agent = getter->user_agent(); | 301 std::string user_agent = getter->user_agent(); |
302 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); | 302 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); |
303 getter->set_user_agent(user_agent); | 303 getter->set_user_agent(user_agent); |
304 return getter; | 304 return getter; |
305 } | 305 } |
306 | 306 |
307 } // namespace cloud_print | 307 } // namespace cloud_print |
OLD | NEW |