chromeos: Fix inappropriate NULL check in AddDriveMountPoint

BUG=None

Review URL: https://codereview.chromium.org/12811017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190562 0039d316-1c4b-4281-b951-d872f2087c98
parent 653a2f33
...@@ -242,10 +242,10 @@ void AddDriveMountPoint( ...@@ -242,10 +242,10 @@ void AddDriveMountPoint(
// Grant R/W permission for tmp and pinned cache folder. // Grant R/W permission for tmp and pinned cache folder.
drive::DriveSystemService* system_service = drive::DriveSystemService* system_service =
drive::DriveSystemServiceFactory::GetForProfile(profile); drive::DriveSystemServiceFactory::GetForProfile(profile);
drive::DriveCache* cache = system_service ? system_service->cache() : NULL;
// |system_service| is NULL if Drive is disabled. // |system_service| is NULL if Drive is disabled.
if (!system_service || !system_service->file_system()) if (!cache)
return; return;
drive::DriveCache* cache = system_service->cache();
// We check permissions for raw cache file paths only for read-only // We check permissions for raw cache file paths only for read-only
// operations (when fileEntry.file() is called), so read only permissions // operations (when fileEntry.file() is called), so read only permissions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment