| 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/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/common/cloud_print/cloud_print_consts.h" |
| 9 #include "chrome/common/cloud_print/cloud_print_helpers.h" | 10 #include "chrome/common/cloud_print/cloud_print_helpers.h" |
| 10 #include "chrome/service/cloud_print/cloud_print_consts.h" | 11 #include "chrome/service/cloud_print/cloud_print_consts.h" |
| 11 #include "chrome/service/cloud_print/cloud_print_helpers.h" | 12 #include "chrome/service/cloud_print/cloud_print_helpers.h" |
| 12 #include "chrome/service/cloud_print/cloud_print_token_store.h" | 13 #include "chrome/service/cloud_print/cloud_print_token_store.h" |
| 13 #include "chrome/service/net/service_url_request_context.h" | 14 #include "chrome/service/net/service_url_request_context.h" |
| 14 #include "chrome/service/service_process.h" | 15 #include "chrome/service/service_process.h" |
| 15 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 16 #include "net/base/load_flags.h" | 17 #include "net/base/load_flags.h" |
| 17 #include "net/http/http_status_code.h" | 18 #include "net/http/http_status_code.h" |
| 18 #include "net/url_request/url_fetcher.h" | 19 #include "net/url_request/url_fetcher.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 206 |
| 206 net::URLRequestContextGetter* CloudPrintURLFetcher::GetRequestContextGetter() { | 207 net::URLRequestContextGetter* CloudPrintURLFetcher::GetRequestContextGetter() { |
| 207 ServiceURLRequestContextGetter* getter = | 208 ServiceURLRequestContextGetter* getter = |
| 208 g_service_process->GetServiceURLRequestContextGetter(); | 209 g_service_process->GetServiceURLRequestContextGetter(); |
| 209 // Now set up the user agent for cloudprint. | 210 // Now set up the user agent for cloudprint. |
| 210 std::string user_agent = getter->user_agent(); | 211 std::string user_agent = getter->user_agent(); |
| 211 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); | 212 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); |
| 212 getter->set_user_agent(user_agent); | 213 getter->set_user_agent(user_agent); |
| 213 return getter; | 214 return getter; |
| 214 } | 215 } |
| OLD | NEW |