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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10198003: gdata: Get rid of GetGDataCacheTmpDirectory() and friends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.h » ('j') | 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 "chrome/browser/chromeos/extensions/file_browser_private_api.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // |system_service| is NULL if incognito window / guest login. 390 // |system_service| is NULL if incognito window / guest login.
391 if (!system_service || !system_service->file_system()) 391 if (!system_service || !system_service->file_system())
392 return; 392 return;
393 gdata::GDataFileSystem* gdata_file_system = system_service->file_system(); 393 gdata::GDataFileSystem* gdata_file_system = system_service->file_system();
394 394
395 // We check permissions for raw cache file paths only for read-only 395 // We check permissions for raw cache file paths only for read-only
396 // operations (when fileEntry.file() is called), so read only permissions 396 // operations (when fileEntry.file() is called), so read only permissions
397 // should be sufficient for all cache paths. For the rest of supported 397 // should be sufficient for all cache paths. For the rest of supported
398 // operations the file access check is done for gdata/ paths. 398 // operations the file access check is done for gdata/ paths.
399 GrantFilePermissionsToHost(render_view_host(), 399 GrantFilePermissionsToHost(render_view_host(),
400 gdata_file_system->GetGDataCacheTmpDirectory(), 400 gdata_file_system->GetCacheDirectoryPath(
401 gdata::GDataRootDirectory::CACHE_TYPE_TMP),
401 file_handler_util::GetReadOnlyPermissions()); 402 file_handler_util::GetReadOnlyPermissions());
402 GrantFilePermissionsToHost( 403 GrantFilePermissionsToHost(
403 render_view_host(), 404 render_view_host(),
404 gdata_file_system->GetGDataCachePersistentDirectory(), 405 gdata_file_system->GetCacheDirectoryPath(
406 gdata::GDataRootDirectory::CACHE_TYPE_PERSISTENT),
405 file_handler_util::GetReadOnlyPermissions()); 407 file_handler_util::GetReadOnlyPermissions());
406 408
407 provider->AddRemoteMountPoint( 409 provider->AddRemoteMountPoint(
408 mount_point, 410 mount_point,
409 new gdata::GDataFileSystemProxy(gdata_file_system)); 411 new gdata::GDataFileSystemProxy(gdata_file_system));
410 412
411 FilePath mount_point_virtual; 413 FilePath mount_point_virtual;
412 if (provider->GetVirtualPath(mount_point, &mount_point_virtual)) 414 if (provider->GetVirtualPath(mount_point, &mount_point_virtual))
413 provider->GrantFileAccessToExtension(extension_id(), mount_point_virtual); 415 provider->GrantFileAccessToExtension(extension_id(), mount_point_virtual);
414 } 416 }
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 if (value->GetBoolean("cellularDisabled", &tmp)) { 1998 if (value->GetBoolean("cellularDisabled", &tmp)) {
1997 service->SetBoolean(prefs::kDisableGDataOverCellular, tmp); 1999 service->SetBoolean(prefs::kDisableGDataOverCellular, tmp);
1998 } 2000 }
1999 2001
2000 if (value->GetBoolean("hostedFilesDisabled", &tmp)) { 2002 if (value->GetBoolean("hostedFilesDisabled", &tmp)) {
2001 service->SetBoolean(prefs::kDisableGDataHostedFiles, tmp); 2003 service->SetBoolean(prefs::kDisableGDataHostedFiles, tmp);
2002 } 2004 }
2003 2005
2004 return true; 2006 return true;
2005 } 2007 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698