OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/common/net/http_return.h" | 9 #include "chrome/common/net/http_return.h" |
10 #include "chrome/common/net/url_fetcher_protect.h" | 10 #include "chrome/common/net/url_fetcher_protect.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 void CloudPrintURLFetcher::StartRequestNow() { | 142 void CloudPrintURLFetcher::StartRequestNow() { |
143 request_->Start(); | 143 request_->Start(); |
144 } | 144 } |
145 | 145 |
146 URLRequestContextGetter* CloudPrintURLFetcher::GetRequestContextGetter() { | 146 URLRequestContextGetter* CloudPrintURLFetcher::GetRequestContextGetter() { |
147 ServiceURLRequestContextGetter* getter = | 147 ServiceURLRequestContextGetter* getter = |
148 new ServiceURLRequestContextGetter(); | 148 new ServiceURLRequestContextGetter(); |
149 // Now set up the user agent for cloudprint. | 149 // Now set up the user agent for cloudprint. |
150 std::string user_agent = getter->user_agent(); | 150 std::string user_agent = getter->user_agent(); |
151 StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); | 151 base::StringAppendF(&user_agent, " %s", kCloudPrintUserAgent); |
152 getter->set_user_agent(user_agent); | 152 getter->set_user_agent(user_agent); |
153 return getter; | 153 return getter; |
154 } | 154 } |
155 | 155 |
OLD | NEW |