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

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

Issue 130913013: [SyncFS] Add ScopedEnableSyncFSV2 for testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/syncable_file_system_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/syncable_file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698