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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service.h

Issue 11149006: Extend scoped_ptr to be closer to unique_ptr. Support custom deleters, and deleting arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix reset() to not call deleter on NULL ptr_. Matches unique_ptr<> spec. Created 8 years 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
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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // process when it detects changes in remote/local filesystem for 65 // process when it detects changes in remote/local filesystem for
66 // registered origins. 66 // registered origins.
67 // It is enabled by default but can be disabled for testing (or maybe 67 // It is enabled by default but can be disabled for testing (or maybe
68 // via an explicit API call). 68 // via an explicit API call).
69 void set_auto_sync_enabled(bool flag) { auto_sync_enabled_ = flag; } 69 void set_auto_sync_enabled(bool flag) { auto_sync_enabled_ = flag; }
70 bool auto_sync_enabled() const { return auto_sync_enabled_; } 70 bool auto_sync_enabled() const { return auto_sync_enabled_; }
71 71
72 private: 72 private:
73 friend class SyncFileSystemServiceFactory; 73 friend class SyncFileSystemServiceFactory;
74 friend class SyncFileSystemServiceTest; 74 friend class SyncFileSystemServiceTest;
75 friend class scoped_ptr<SyncFileSystemService>; 75 friend struct base::DefaultDeleter<SyncFileSystemService>;
76 76
77 explicit SyncFileSystemService(Profile* profile); 77 explicit SyncFileSystemService(Profile* profile);
78 virtual ~SyncFileSystemService(); 78 virtual ~SyncFileSystemService();
79 79
80 void Initialize(scoped_ptr<LocalFileSyncService> local_file_service, 80 void Initialize(scoped_ptr<LocalFileSyncService> local_file_service,
81 scoped_ptr<RemoteFileSyncService> remote_file_service); 81 scoped_ptr<RemoteFileSyncService> remote_file_service);
82 82
83 void DidGetConflictFileInfo(const fileapi::ConflictFileInfoCallback& callback, 83 void DidGetConflictFileInfo(const fileapi::ConflictFileInfoCallback& callback,
84 const fileapi::FileSystemURL& url, 84 const fileapi::FileSystemURL& url,
85 const fileapi::SyncFileMetadata* local_metadata, 85 const fileapi::SyncFileMetadata* local_metadata,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // ProfileKeyedServiceFactory overrides. 169 // ProfileKeyedServiceFactory overrides.
170 virtual ProfileKeyedService* BuildServiceInstanceFor( 170 virtual ProfileKeyedService* BuildServiceInstanceFor(
171 Profile* profile) const OVERRIDE; 171 Profile* profile) const OVERRIDE;
172 172
173 mutable scoped_ptr<RemoteFileSyncService> mock_remote_file_service_; 173 mutable scoped_ptr<RemoteFileSyncService> mock_remote_file_service_;
174 }; 174 };
175 175
176 } // namespace sync_file_system 176 } // namespace sync_file_system
177 177
178 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ 178 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698