chromeos: Move SetMountedState from GDataFileSystem to GDataCache

BUG=131756
TEST=unit_tests --gtest_filter="GData*"


Review URL: https://chromiumcodereview.appspot.com/10534155

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142146 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.h b/chrome/browser/chromeos/gdata/gdata_cache.h
index e2027aa5..042a61d8 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache.h
+++ b/chrome/browser/chromeos/gdata/gdata_cache.h
@@ -18,6 +18,10 @@
 
 namespace gdata {
 
+// Callback for SetMountedStateOnUIThread.
+typedef base::Callback<void(base::PlatformFileError error,
+                            const FilePath& file_path)> SetMountedStateCallback;
+
 // GDataCache is used to maintain cache states of GDataFileSystem.
 //
 // All non-static public member functions, unless mentioned otherwise (see
@@ -196,6 +200,11 @@
              FileOperationType file_operation_type,
              base::PlatformFileError* error);
 
+  // Utility method to call SetMountedState on UI thread.
+  void SetMountedStateOnUIThread(const FilePath& file_path,
+                                 bool to_mount,
+                                 const SetMountedStateCallback& callback);
+
   // Modifies cache state, which involves the following:
   // - moves |source_path| to |dest_path|, where
   //   if we're mounting: |source_path| is the unmounted path and has .<md5>