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

Side by Side Diff: webkit/fileapi/syncable/syncable_file_system_util.cc

Issue 15026008: Add enable-sync-directory-operation to about:flags (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comments Created 7 years, 7 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
« no previous file with comments | « webkit/fileapi/syncable/syncable_file_system_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "webkit/fileapi/syncable/syncable_file_system_util.h" 5 #include "webkit/fileapi/syncable/syncable_file_system_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "webkit/fileapi/external_mount_points.h" 8 #include "webkit/fileapi/external_mount_points.h"
9 #include "webkit/fileapi/file_observers.h" 9 #include "webkit/fileapi/file_observers.h"
10 #include "webkit/fileapi/file_system_context.h" 10 #include "webkit/fileapi/file_system_context.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // A command switch to enable syncing directory operations in Sync FileSystem 23 // A command switch to enable syncing directory operations in Sync FileSystem
24 // API. (http://crbug.com/161442) 24 // API. (http://crbug.com/161442)
25 // TODO(kinuko): this command-line switch should be temporary. 25 // TODO(kinuko): this command-line switch should be temporary.
26 const char kEnableSyncDirectoryOperation[] = "enable-sync-directory-operation"; 26 const char kEnableSyncDirectoryOperation[] = "enable-sync-directory-operation";
27 27
28 bool is_directory_operation_enabled = false; 28 bool is_directory_operation_enabled = false;
29 29
30 } 30 }
31 31
32 const char* GetFlagForSyncFileSystemDirectoryOperation() {
33 return kEnableSyncDirectoryOperation;
34 }
35
32 bool RegisterSyncableFileSystem(const std::string& service_name) { 36 bool RegisterSyncableFileSystem(const std::string& service_name) {
33 return ExternalMountPoints::GetSystemInstance()->RegisterFileSystem( 37 return ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
34 service_name, fileapi::kFileSystemTypeSyncable, base::FilePath()); 38 service_name, fileapi::kFileSystemTypeSyncable, base::FilePath());
35 } 39 }
36 40
37 bool RevokeSyncableFileSystem(const std::string& service_name) { 41 bool RevokeSyncableFileSystem(const std::string& service_name) {
38 return ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 42 return ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
39 service_name); 43 service_name);
40 } 44 }
41 45
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 is_directory_operation_enabled = flag; 104 is_directory_operation_enabled = flag;
101 } 105 }
102 106
103 bool IsSyncDirectoryOperationEnabled() { 107 bool IsSyncDirectoryOperationEnabled() {
104 return is_directory_operation_enabled || 108 return is_directory_operation_enabled ||
105 CommandLine::ForCurrentProcess()->HasSwitch( 109 CommandLine::ForCurrentProcess()->HasSwitch(
106 kEnableSyncDirectoryOperation); 110 kEnableSyncDirectoryOperation);
107 } 111 }
108 112
109 } // namespace sync_file_system 113 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « webkit/fileapi/syncable/syncable_file_system_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698