Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: rlz/lib/financial_ping.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // Library functions related to the Financial Server ping. 5 // Library functions related to the Financial Server ping.
6 6
7 #include "rlz/lib/financial_ping.h" 7 #include "rlz/lib/financial_ping.h"
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // Ensure that we have a MessageLoop. 306 // Ensure that we have a MessageLoop.
307 if (!base::MessageLoop::current()) 307 if (!base::MessageLoop::current())
308 message_loop.reset(new base::MessageLoop); 308 message_loop.reset(new base::MessageLoop);
309 base::RunLoop loop; 309 base::RunLoop loop;
310 FinancialPingUrlFetcherDelegate delegate(loop.QuitClosure()); 310 FinancialPingUrlFetcherDelegate delegate(loop.QuitClosure());
311 311
312 std::string url = base::StringPrintf("http://%s:%d%s", 312 std::string url = base::StringPrintf("http://%s:%d%s",
313 kFinancialServer, kFinancialPort, 313 kFinancialServer, kFinancialPort,
314 request); 314 request);
315 315
316 scoped_ptr<net::URLFetcher> fetcher(net::URLFetcher::Create( 316 scoped_ptr<net::URLFetcher> fetcher =
317 GURL(url), net::URLFetcher::GET, &delegate)); 317 net::URLFetcher::Create(GURL(url), net::URLFetcher::GET, &delegate);
318 318
319 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | 319 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE |
320 net::LOAD_DO_NOT_SEND_AUTH_DATA | 320 net::LOAD_DO_NOT_SEND_AUTH_DATA |
321 net::LOAD_DO_NOT_SEND_COOKIES | 321 net::LOAD_DO_NOT_SEND_COOKIES |
322 net::LOAD_DO_NOT_SAVE_COOKIES); 322 net::LOAD_DO_NOT_SAVE_COOKIES);
323 323
324 // Ensure rlz_lib::SetURLRequestContext() has been called before sending 324 // Ensure rlz_lib::SetURLRequestContext() has been called before sending
325 // pings. 325 // pings.
326 fetcher->SetRequestContext(context); 326 fetcher->SetRequestContext(context);
327 327
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 404
405 bool WasSendFinancialPingInterrupted() { 405 bool WasSendFinancialPingInterrupted() {
406 return send_financial_ping_interrupted_for_test; 406 return send_financial_ping_interrupted_for_test;
407 } 407 }
408 408
409 } // namespace test 409 } // namespace test
410 #endif 410 #endif
411 411
412 } // namespace rlz_lib 412 } // namespace rlz_lib
OLDNEW
« no previous file with comments | « remoting/test/remote_host_info_fetcher.cc ('k') | sync/internal_api/attachments/attachment_downloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698