| OLD | NEW |
| 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/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 public: | 108 public: |
| 109 ScopedEnableSyncFSDirectoryOperation(); | 109 ScopedEnableSyncFSDirectoryOperation(); |
| 110 ~ScopedEnableSyncFSDirectoryOperation(); | 110 ~ScopedEnableSyncFSDirectoryOperation(); |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 bool was_enabled_; | 113 bool was_enabled_; |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(ScopedEnableSyncFSDirectoryOperation); | 115 DISALLOW_COPY_AND_ASSIGN(ScopedEnableSyncFSDirectoryOperation); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 // Enables V2 backend for syncable filesystems temporarily for testing. |
| 119 class ScopedEnableSyncFSV2 { |
| 120 public: |
| 121 ScopedEnableSyncFSV2(); |
| 122 ~ScopedEnableSyncFSV2(); |
| 123 |
| 124 private: |
| 125 bool was_enabled_; |
| 126 |
| 127 DISALLOW_COPY_AND_ASSIGN(ScopedEnableSyncFSV2); |
| 128 }; |
| 129 |
| 118 // Posts |callback| to the current thread. | 130 // Posts |callback| to the current thread. |
| 119 void RunSoon(const tracked_objects::Location& from_here, | 131 void RunSoon(const tracked_objects::Location& from_here, |
| 120 const base::Closure& callback); | 132 const base::Closure& callback); |
| 121 | 133 |
| 122 } // namespace sync_file_system | 134 } // namespace sync_file_system |
| 123 | 135 |
| 124 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_ | 136 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNCABLE_FILE_SYSTEM_UTIL_H_ |
| OLD | NEW |