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 13932033: Disk cache: Make sure that the CacheCreator captures the required arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | no next file » | 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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/metrics/field_trial.h" 6 #include "base/metrics/field_trial.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "net/disk_cache/backend_impl.h" 9 #include "net/disk_cache/backend_impl.h"
10 #include "net/disk_cache/cache_util.h" 10 #include "net/disk_cache/cache_util.h"
(...skipping 20 matching lines...) Expand all
31 // Creates the backend. 31 // Creates the backend.
32 int Run(); 32 int Run();
33 33
34 private: 34 private:
35 ~CacheCreator(); 35 ~CacheCreator();
36 36
37 void DoCallback(int result); 37 void DoCallback(int result);
38 38
39 void OnIOComplete(int result); 39 void OnIOComplete(int result);
40 40
41 const base::FilePath& path_; 41 const base::FilePath path_;
42 bool force_; 42 bool force_;
43 bool retry_; 43 bool retry_;
44 int max_bytes_; 44 int max_bytes_;
45 net::CacheType type_; 45 net::CacheType type_;
46 uint32 flags_; 46 uint32 flags_;
47 scoped_refptr<base::MessageLoopProxy> thread_; 47 scoped_refptr<base::MessageLoopProxy> thread_;
48 disk_cache::Backend** backend_; 48 disk_cache::Backend** backend_;
49 net::CompletionCallback callback_; 49 net::CompletionCallback callback_;
50 disk_cache::Backend* created_cache_; 50 disk_cache::Backend* created_cache_;
51 net::NetLog* net_log_; 51 net::NetLog* net_log_;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 *backend = disk_cache::MemBackendImpl::CreateBackend(max_bytes, net_log); 155 *backend = disk_cache::MemBackendImpl::CreateBackend(max_bytes, net_log);
156 return *backend ? net::OK : net::ERR_FAILED; 156 return *backend ? net::OK : net::ERR_FAILED;
157 } 157 }
158 DCHECK(thread); 158 DCHECK(thread);
159 CacheCreator* creator = new CacheCreator(path, force, max_bytes, type, kNone, 159 CacheCreator* creator = new CacheCreator(path, force, max_bytes, type, kNone,
160 thread, net_log, backend, callback); 160 thread, net_log, backend, callback);
161 return creator->Run(); 161 return creator->Run();
162 } 162 }
163 163
164 } // namespace disk_cache 164 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698