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

Side by Side Diff: device/test/usb_test_gadget_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "device/test/usb_test_gadget.h" 5 #include "device/test/usb_test_gadget.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 file_path = file_path.AppendASCII("usb_gadget.zip"); 116 file_path = file_path.AppendASCII("usb_gadget.zip");
117 117
118 return ReadFile(file_path, package); 118 return ReadFile(file_path, package);
119 } 119 }
120 120
121 scoped_ptr<net::URLFetcher> CreateURLFetcher( 121 scoped_ptr<net::URLFetcher> CreateURLFetcher(
122 scoped_refptr<net::URLRequestContextGetter> request_context_getter, 122 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
123 const GURL& url, 123 const GURL& url,
124 net::URLFetcher::RequestType request_type, 124 net::URLFetcher::RequestType request_type,
125 net::URLFetcherDelegate* delegate) { 125 net::URLFetcherDelegate* delegate) {
126 scoped_ptr<net::URLFetcher> url_fetcher( 126 scoped_ptr<net::URLFetcher> url_fetcher =
127 net::URLFetcher::Create(url, request_type, delegate)); 127 net::URLFetcher::Create(url, request_type, delegate);
128 128
129 url_fetcher->SetRequestContext(request_context_getter.get()); 129 url_fetcher->SetRequestContext(request_context_getter.get());
130 130
131 return url_fetcher; 131 return url_fetcher;
132 } 132 }
133 133
134 class URLRequestContextGetter : public net::URLRequestContextGetter { 134 class URLRequestContextGetter : public net::URLRequestContextGetter {
135 public: 135 public:
136 URLRequestContextGetter( 136 URLRequestContextGetter(
137 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner) 137 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner)
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 return false; 602 return false;
603 } 603 }
604 604
605 DeviceAddListener add_listener(usb_service_, device_address_, -1); 605 DeviceAddListener add_listener(usb_service_, device_address_, -1);
606 device_ = add_listener.WaitForAdd(); 606 device_ = add_listener.WaitForAdd();
607 DCHECK(device_.get()); 607 DCHECK(device_.get());
608 return true; 608 return true;
609 } 609 }
610 610
611 } // namespace device 611 } // namespace device
OLDNEW
« no previous file with comments | « content/shell/browser/shell_devtools_frontend.cc ('k') | extensions/browser/content_hash_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698