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

Unified Diff: net/disk_cache/simple/simple_entry_impl.h

Issue 14022012: Code quality and standards in SimpleBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remediate 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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/simple/simple_entry_impl.h
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index d1b1c73ea7a67e52f54a61dee77f061f4abb4c88..544c75813b8e80f3cc4b20d5697636ca3301f94b 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -29,23 +29,24 @@ class SimpleSynchronousEntry;
// SimpleEntryImpl is the IO thread interface to an entry in the very simple
// disk cache. It proxies for the SimpleSynchronousEntry, which performs IO
// on the worker thread.
+
rvargas (doing something else) 2013/04/18 17:31:50 nit: extra line
class SimpleEntryImpl : public Entry,
public base::RefCountedThreadSafe<SimpleEntryImpl> {
friend class base::RefCountedThreadSafe<SimpleEntryImpl>;
public:
- static int OpenEntry(const scoped_refptr<SimpleIndex>& index,
+ static int OpenEntry(SimpleIndex* index,
const base::FilePath& path,
const std::string& key,
Entry** entry,
const CompletionCallback& callback);
- static int CreateEntry(const scoped_refptr<SimpleIndex>& index,
+ static int CreateEntry(SimpleIndex* index,
const base::FilePath& path,
const std::string& key,
Entry** entry,
const CompletionCallback& callback);
- static int DoomEntry(const scoped_refptr<SimpleIndex>& index,
+ static int DoomEntry(SimpleIndex* index,
const base::FilePath& path,
const std::string& key,
const CompletionCallback& callback);
@@ -85,7 +86,7 @@ class SimpleEntryImpl : public Entry,
virtual int ReadyForSparseIO(const CompletionCallback& callback) OVERRIDE;
private:
- SimpleEntryImpl(const scoped_refptr<SimpleIndex>& index,
+ SimpleEntryImpl(SimpleIndex* index,
const base::FilePath& path,
const std::string& key);
@@ -116,8 +117,8 @@ class SimpleEntryImpl : public Entry,
// thread, in all cases. |io_thread_checker_| documents and enforces this.
base::ThreadChecker io_thread_checker_;
- const scoped_refptr<base::MessageLoopProxy> constructor_thread_;
- const scoped_refptr<SimpleIndex> index_;
+ const scoped_refptr<base::SingleThreadTaskRunner> constructor_thread_;
+ const base::WeakPtr<SimpleIndex> index_;
const base::FilePath path_;
const std::string key_;

Powered by Google App Engine
This is Rietveld 408576698