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

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

Issue 23578026: Use SNAPSHOT sync mode for LocalSync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased on thread_bundle fix Created 7 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 | Annotate | Revision Log
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_SYNCABLE_FILE_SYSTEM_UTIL_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void SetEnableSyncFSDirectoryOperation(bool flag); 78 void SetEnableSyncFSDirectoryOperation(bool flag);
79 79
80 // Returns true if we allow directory operations in Sync FileSystem API. 80 // Returns true if we allow directory operations in Sync FileSystem API.
81 // It is disabled by default but can be overridden by a command-line switch 81 // It is disabled by default but can be overridden by a command-line switch
82 // (--enable-syncfs-directory-operations) or by calling 82 // (--enable-syncfs-directory-operations) or by calling
83 // SetEnableSyncFSDirectoryOperation(). 83 // SetEnableSyncFSDirectoryOperation().
84 // TODO(nhiroki): This method should be used only for testing and should go 84 // TODO(nhiroki): This method should be used only for testing and should go
85 // away when we fully support directory operations. (http://crbug.com/161442) 85 // away when we fully support directory operations. (http://crbug.com/161442)
86 bool IsSyncFSDirectoryOperationEnabled(); 86 bool IsSyncFSDirectoryOperationEnabled();
87 87
88 // Returns SyncFileSystem sub-directory path.
89 base::FilePath GetSyncFileSystemDir(const base::FilePath& profile_base_dir);
90
88 // Enables directory operation for syncable filesystems temporarily for testing. 91 // Enables directory operation for syncable filesystems temporarily for testing.
89 class ScopedEnableSyncFSDirectoryOperation { 92 class ScopedEnableSyncFSDirectoryOperation {
90 public: 93 public:
91 ScopedEnableSyncFSDirectoryOperation(); 94 ScopedEnableSyncFSDirectoryOperation();
92 ~ScopedEnableSyncFSDirectoryOperation(); 95 ~ScopedEnableSyncFSDirectoryOperation();
93 96
94 private: 97 private:
95 bool was_enabled_; 98 bool was_enabled_;
96 99
97 DISALLOW_COPY_AND_ASSIGN(ScopedEnableSyncFSDirectoryOperation); 100 DISALLOW_COPY_AND_ASSIGN(ScopedEnableSyncFSDirectoryOperation);
98 }; 101 };
99 102
100 } // namespace sync_file_system 103 } // namespace sync_file_system
101 104
102 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_ 105 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698