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

Unified Diff: chrome/browser/chromeos/drive/file_system_util.h

Issue 23523022: Replace GetForProfile by Get{FileSystem,DriveAppRegistry,DriveService)ByProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/drive/file_system_util.h
diff --git a/chrome/browser/chromeos/drive/file_system_util.h b/chrome/browser/chromeos/drive/file_system_util.h
index 165ddd9fa3a440e20dc1e0873fe3b05be47b8384..eecdb081298abe03bba7e18f0e57eef36be202f0 100644
--- a/chrome/browser/chromeos/drive/file_system_util.h
+++ b/chrome/browser/chromeos/drive/file_system_util.h
@@ -23,6 +23,8 @@ class FileSystemURL;
namespace drive {
+class DriveAppRegistry;
+class DriveServiceInterface;
class FileSystemInterface;
class ResourceEntry;
@@ -71,6 +73,10 @@ const base::FilePath& GetDriveMyDriveRootPath();
// Returns the Drive mount point path, which looks like "/special/drive".
const base::FilePath& GetDriveMountPointPath();
+// Returns the FileSystem for the |profile|. If not available (not mounted
+// or disabled), returns NULL.
+FileSystemInterface* GetFileSystemByProfile(Profile* profile);
+
// Returns a FileSystemInterface instance for the |profile_id|, or NULL
// if the Profile for |profile_id| is destructed or Drive File System is
// disabled for the profile.
@@ -81,6 +87,14 @@ const base::FilePath& GetDriveMountPointPath();
// This function must be called on UI thread.
FileSystemInterface* GetFileSystemByProfileId(void* profile_id);
+// Returns the DriveAppRegistry for the |profile|. If not available (not
+// mounted or disabled), returns NULL.
+DriveAppRegistry* GetDriveAppRegistryByProfile(Profile* profile);
+
+// Returns the DriveService for the |profile|. If not available (not mounted
+// or disabled), returns NULL.
+DriveServiceInterface* GetDriveServiceByProfile(Profile* profile);
+
// Checks if the resource ID is a special one, which is effective only in our
// implementation and is not supposed to be sent to the server.
bool IsSpecialResourceId(const std::string& resource_id);

Powered by Google App Engine
This is Rietveld 408576698