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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10546093: gdata: Move ownership of GDataCache to GDataSystemService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index 2df1c522a63130c1f6433b60a68f36217b1ce45f..ac5dcf83794c26df4d2123b558ed5da5842f1d01 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -198,22 +198,23 @@ void AddGDataMountPoint(
// |system_service| is NULL if incognito window / guest login.
if (!system_service || !system_service->file_system())
return;
- gdata::GDataFileSystem* gdata_file_system = system_service->file_system();
+ gdata::GDataCache* cache = system_service->cache();
// We check permissions for raw cache file paths only for read-only
// operations (when fileEntry.file() is called), so read only permissions
// should be sufficient for all cache paths. For the rest of supported
// operations the file access check is done for drive/ paths.
GrantFilePermissionsToHost(render_view_host,
- gdata_file_system->GetCacheDirectoryPath(
+ cache->GetCacheDirectoryPath(
gdata::GDataCache::CACHE_TYPE_TMP),
file_handler_util::GetReadOnlyPermissions());
GrantFilePermissionsToHost(
render_view_host,
- gdata_file_system->GetCacheDirectoryPath(
+ cache->GetCacheDirectoryPath(
gdata::GDataCache::CACHE_TYPE_PERSISTENT),
file_handler_util::GetReadOnlyPermissions());
+ gdata::GDataFileSystem* gdata_file_system = system_service->file_system();
provider->AddRemoteMountPoint(
mount_point,
new gdata::GDataFileSystemProxy(gdata_file_system));
@@ -1003,7 +1004,9 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread(
gdata::GDataSystemServiceFactory::GetForProfile(profile_);
gdata::GDataFileSystem* file_system =
system_service ? system_service->file_system() : NULL;
- if (file_system && file_system->IsUnderGDataCacheDirectory(source_path)) {
+ gdata::GDataCache* cache =
+ system_service ? system_service->cache() : NULL;
+ if (file_system && cache && cache->IsUnderGDataCacheDirectory(source_path)) {
file_system->SetMountedState(
source_path,
true,

Powered by Google App Engine
This is Rietveld 408576698