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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/common/cloud_print/cloud_print_constants.h" | 12 #include "chrome/common/cloud_print/cloud_print_constants.h" |
13 #include "chrome/common/cloud_print/cloud_print_helpers.h" | 13 #include "chrome/common/cloud_print/cloud_print_helpers.h" |
14 #include "chrome/service/cloud_print/cloud_print_service_helpers.h" | 14 #include "chrome/service/cloud_print/cloud_print_service_helpers.h" |
15 #include "chrome/service/cloud_print/cloud_print_token_store.h" | 15 #include "chrome/service/cloud_print/cloud_print_token_store.h" |
16 #include "chrome/service/net/service_url_request_context_getter.h" | 16 #include "chrome/service/net/service_url_request_context_getter.h" |
17 #include "chrome/service/service_process.h" | 17 #include "chrome/service/service_process.h" |
18 #include "net/base/load_flags.h" | 18 #include "net/base/load_flags.h" |
19 #include "net/http/http_status_code.h" | 19 #include "net/http/http_status_code.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 ServiceURLRequestContextGetter* getter = | 293 ServiceURLRequestContextGetter* getter = |
294 g_service_process->GetServiceURLRequestContextGetter(); | 294 g_service_process->GetServiceURLRequestContextGetter(); |
295 // Now set up the user agent for cloudprint. | 295 // Now set up the user agent for cloudprint. |
296 std::string user_agent = getter->user_agent(); | 296 std::string user_agent = getter->user_agent(); |
297 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); | 297 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); |
298 getter->set_user_agent(user_agent); | 298 getter->set_user_agent(user_agent); |
299 return getter; | 299 return getter; |
300 } | 300 } |
301 | 301 |
302 } // namespace cloud_print | 302 } // namespace cloud_print |
OLD | NEW |