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

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

Issue 407073003: [SyncFS] Add completion callback to PromoteDemotedChanges (1/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" 5 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 20 matching lines...) Expand all
31 31
32 const char kSyncableMountName[] = "syncfs"; 32 const char kSyncableMountName[] = "syncfs";
33 const char kSyncableMountNameForInternalSync[] = "syncfs-internal"; 33 const char kSyncableMountNameForInternalSync[] = "syncfs-internal";
34 34
35 const base::FilePath::CharType kSyncFileSystemDir[] = 35 const base::FilePath::CharType kSyncFileSystemDir[] =
36 FILE_PATH_LITERAL("Sync FileSystem"); 36 FILE_PATH_LITERAL("Sync FileSystem");
37 37
38 // Flags to enable features for testing. 38 // Flags to enable features for testing.
39 bool g_is_syncfs_v2_enabled = true; 39 bool g_is_syncfs_v2_enabled = true;
40 40
41 void Noop() {}
42
41 } // namespace 43 } // namespace
42 44
43 void RegisterSyncableFileSystem() { 45 void RegisterSyncableFileSystem() {
44 ExternalMountPoints::GetSystemInstance()->RegisterFileSystem( 46 ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
45 kSyncableMountName, 47 kSyncableMountName,
46 fileapi::kFileSystemTypeSyncable, 48 fileapi::kFileSystemTypeSyncable,
47 fileapi::FileSystemMountOption(), 49 fileapi::FileSystemMountOption(),
48 base::FilePath()); 50 base::FilePath());
49 ExternalMountPoints::GetSystemInstance()->RegisterFileSystem( 51 ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
50 kSyncableMountNameForInternalSync, 52 kSyncableMountNameForInternalSync,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ScopedDisableSyncFSV2::~ScopedDisableSyncFSV2() { 160 ScopedDisableSyncFSV2::~ScopedDisableSyncFSV2() {
159 DCHECK(!IsV2Enabled()); 161 DCHECK(!IsV2Enabled());
160 g_is_syncfs_v2_enabled = was_enabled_; 162 g_is_syncfs_v2_enabled = was_enabled_;
161 } 163 }
162 164
163 void RunSoon(const tracked_objects::Location& from_here, 165 void RunSoon(const tracked_objects::Location& from_here,
164 const base::Closure& callback) { 166 const base::Closure& callback) {
165 base::MessageLoop::current()->PostTask(from_here, callback); 167 base::MessageLoop::current()->PostTask(from_here, callback);
166 } 168 }
167 169
170 base::Closure NoopClosure() {
171 return base::Bind(&Noop);
172 }
173
168 } // namespace sync_file_system 174 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698