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

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

Issue 12811017: chromeos: Fix inappropriate NULL check in AddDriveMountPoint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 7 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ac227b3d5fff5c1985537fedb08e8d4c609c4e10..6fa3e4f2a38ac57cbdf758b9fce6865b4f0f554d 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -242,10 +242,10 @@ void AddDriveMountPoint(
// Grant R/W permission for tmp and pinned cache folder.
drive::DriveSystemService* system_service =
drive::DriveSystemServiceFactory::GetForProfile(profile);
+ drive::DriveCache* cache = system_service ? system_service->cache() : NULL;
// |system_service| is NULL if Drive is disabled.
- if (!system_service || !system_service->file_system())
+ if (!cache)
return;
- drive::DriveCache* 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698