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

Side by Side Diff: chrome/browser/sync_file_system/local/canned_syncable_file_system.h

Issue 515093002: FileAPI/sync file system cleanups for scoped_refptr operator T* cleanup. (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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 OpenFileSystemCallback; 63 OpenFileSystemCallback;
64 typedef base::Callback<void(base::File::Error)> StatusCallback; 64 typedef base::Callback<void(base::File::Error)> StatusCallback;
65 typedef base::Callback<void(int64)> WriteCallback; 65 typedef base::Callback<void(int64)> WriteCallback;
66 typedef storage::FileSystemOperation::FileEntryList FileEntryList; 66 typedef storage::FileSystemOperation::FileEntryList FileEntryList;
67 67
68 enum QuotaMode { 68 enum QuotaMode {
69 QUOTA_ENABLED, 69 QUOTA_ENABLED,
70 QUOTA_DISABLED, 70 QUOTA_DISABLED,
71 }; 71 };
72 72
73 CannedSyncableFileSystem(const GURL& origin, 73 CannedSyncableFileSystem(
74 leveldb::Env* env_override, 74 const GURL& origin,
75 base::SingleThreadTaskRunner* io_task_runner, 75 leveldb::Env* env_override,
76 base::SingleThreadTaskRunner* file_task_runner); 76 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
77 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
77 virtual ~CannedSyncableFileSystem(); 78 virtual ~CannedSyncableFileSystem();
78 79
79 // SetUp must be called before using this instance. 80 // SetUp must be called before using this instance.
80 void SetUp(QuotaMode quota_mode); 81 void SetUp(QuotaMode quota_mode);
81 82
82 // TearDown must be called before destructing this instance. 83 // TearDown must be called before destructing this instance.
83 void TearDown(); 84 void TearDown();
84 85
85 // Creates a FileSystemURL for the given (utf8) path string. 86 // Creates a FileSystemURL for the given (utf8) path string.
86 storage::FileSystemURL URL(const std::string& path) const; 87 storage::FileSystemURL URL(const std::string& path) const;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 bool is_filesystem_opened_; // Should be accessed only on the IO thread. 244 bool is_filesystem_opened_; // Should be accessed only on the IO thread.
244 245
245 scoped_refptr<ObserverList> sync_status_observers_; 246 scoped_refptr<ObserverList> sync_status_observers_;
246 247
247 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); 248 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem);
248 }; 249 };
249 250
250 } // namespace sync_file_system 251 } // namespace sync_file_system
251 252
252 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ 253 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698