summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrv@chromium.org <grv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 23:32:28 +0000
committergrv@chromium.org <grv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 23:32:28 +0000
commit56a4640321f01fc70cc983c1f6ab136a75dcace8 (patch)
tree21caafeced516f3f6b9326d6b78ff95eea87b4f1
parent398100a1cc56a851de6c77c34cfebb46c7891637 (diff)
downloadchromium_src-56a4640321f01fc70cc983c1f6ab136a75dcace8.zip
chromium_src-56a4640321f01fc70cc983c1f6ab136a75dcace8.tar.gz
chromium_src-56a4640321f01fc70cc983c1f6ab136a75dcace8.tar.bz2
Add enable-sync-directory-operation to about:flags
This adds a flag to about:flags to enable/disable syncfs directory support. BUG=238877 Review URL: https://chromiumcodereview.appspot.com/15026008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199052 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc9
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util.cc4
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util.h2
4 files changed, 21 insertions, 0 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 2f68e34..da67923 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7227,6 +7227,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI" desc="">
1024
</message>
+ <message name="IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME" desc="Name of the flag to enable syncfs directory support.">
+ Enable Syncfs directory operation.
+ </message>
+ <message name="IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION" desc="Description of the flag to enable syncfs directory support.">
+ Enables directory support for sync filesystem.
+ </message>
<!-- Crashes -->
<message name="IDS_CRASHES_TITLE" desc="Title for the chrome://crashes page.">
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index f9291db..2fd8263 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -33,6 +33,7 @@
#include "ui/gl/gl_switches.h"
#include "ui/keyboard/keyboard_switches.h"
#include "ui/surface/surface_switches.h"
+#include "webkit/fileapi/syncable/syncable_file_system_util.h"
#if defined(ENABLE_MESSAGE_CENTER)
#include "ui/message_center/message_center_switches.h"
@@ -1466,6 +1467,14 @@ const Experiment kExperiments[] = {
kOsWin,
SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
},
+ {
+ "enable-sync-directory-operation",
+ IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
+ IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
+ kOsAll,
+ SINGLE_VALUE_TYPE(
+ sync_file_system::GetFlagForSyncFileSystemDirectoryOperation())
+ },
};
const Experiment* experiments = kExperiments;
diff --git a/webkit/fileapi/syncable/syncable_file_system_util.cc b/webkit/fileapi/syncable/syncable_file_system_util.cc
index e785ba4..3dd28f4 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_util.cc
@@ -29,6 +29,10 @@ bool is_directory_operation_enabled = false;
}
+const char* GetFlagForSyncFileSystemDirectoryOperation() {
+ return kEnableSyncDirectoryOperation;
+}
+
bool RegisterSyncableFileSystem(const std::string& service_name) {
return ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
service_name, fileapi::kFileSystemTypeSyncable, base::FilePath());
diff --git a/webkit/fileapi/syncable/syncable_file_system_util.h b/webkit/fileapi/syncable/syncable_file_system_util.h
index 12d4db6..52f52cc 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util.h
+++ b/webkit/fileapi/syncable/syncable_file_system_util.h
@@ -19,6 +19,8 @@ class LocalFileSystemOperation;
namespace sync_file_system {
+WEBKIT_STORAGE_EXPORT const char* GetFlagForSyncFileSystemDirectoryOperation();
+
// Registers a syncable filesystem with the given |service_name|.
WEBKIT_STORAGE_EXPORT bool RegisterSyncableFileSystem(
const std::string& service_name);