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

Side by Side Diff: net/disk_cache/cache_creator.cc

Issue 508733002: Remove implicit conversions from scoped_refptr to T* in net/disk_cache/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « net/disk_cache/blockfile/index_table_v3.cc ('k') | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/metrics/field_trial.h" 6 #include "base/metrics/field_trial.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "net/base/cache_type.h" 9 #include "net/base/cache_type.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 bool force, 171 bool force,
172 const scoped_refptr<base::SingleThreadTaskRunner>& thread, 172 const scoped_refptr<base::SingleThreadTaskRunner>& thread,
173 net::NetLog* net_log, 173 net::NetLog* net_log,
174 scoped_ptr<Backend>* backend, 174 scoped_ptr<Backend>* backend,
175 const net::CompletionCallback& callback) { 175 const net::CompletionCallback& callback) {
176 DCHECK(!callback.is_null()); 176 DCHECK(!callback.is_null());
177 if (type == net::MEMORY_CACHE) { 177 if (type == net::MEMORY_CACHE) {
178 *backend = disk_cache::MemBackendImpl::CreateBackend(max_bytes, net_log); 178 *backend = disk_cache::MemBackendImpl::CreateBackend(max_bytes, net_log);
179 return *backend ? net::OK : net::ERR_FAILED; 179 return *backend ? net::OK : net::ERR_FAILED;
180 } 180 }
181 DCHECK(thread); 181 DCHECK(thread.get());
182 CacheCreator* creator = new CacheCreator(path, 182 CacheCreator* creator = new CacheCreator(path,
183 force, 183 force,
184 max_bytes, 184 max_bytes,
185 type, 185 type,
186 backend_type, 186 backend_type,
187 kNone, 187 kNone,
188 thread, 188 thread,
189 net_log, 189 net_log,
190 backend, 190 backend,
191 callback); 191 callback);
192 return creator->Run(); 192 return creator->Run();
193 } 193 }
194 194
195 } // namespace disk_cache 195 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/index_table_v3.cc ('k') | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698