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

Unified Diff: chrome/browser/chromeos/file_system_provider/service.h

Issue 209663006: [fsp] Simplify ID of provided file systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 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
Index: chrome/browser/chromeos/file_system_provider/service.h
diff --git a/chrome/browser/chromeos/file_system_provider/service.h b/chrome/browser/chromeos/file_system_provider/service.h
index 16ef6356f2b02a131f8970e15e3a623edc0b4c63..f3cb080a4e56aa21aafb7413c626b4565a565797 100644
--- a/chrome/browser/chromeos/file_system_provider/service.h
+++ b/chrome/browser/chromeos/file_system_provider/service.h
@@ -28,17 +28,15 @@ class Service : public KeyedService {
virtual ~Service();
// Registers a file system provided by an extension with the |extension_id|.
- // For success, it returns a file system id, which is of the following format:
- // |extension_id|-unique-hash, where unique is an auto-incremented non-zero
- // number, and hash is the user profile hash.
- // For failures, it returns an empty string.
- std::string RegisterFileSystem(const std::string& extension_id,
- const std::string& file_system_name);
+ // For success, it returns a numeric file system id, which is an
+ // auto-incremented non-zero value. For failures, it returns zero.
+ int RegisterFileSystem(const std::string& extension_id,
+ const std::string& file_system_name);
// Unregisters a file system with the specified |file_system_id| for the
// |extension_id|. For success returns true, otherwise false.
bool UnregisterFileSystem(const std::string& extension_id,
- const std::string& file_system_id);
+ int file_system_id);
// Returns a list of currently registered file systems. All items are copied.
std::vector<ProvidedFileSystem> GetRegisteredFileSystems();
@@ -51,12 +49,12 @@ class Service : public KeyedService {
static Service* Get(content::BrowserContext* context);
private:
- typedef std::map<std::string, ProvidedFileSystem> FileSystemMap;
+ typedef std::map<int, ProvidedFileSystem> FileSystemMap;
Profile* profile_;
ObserverList<Observer> observers_;
FileSystemMap file_systems_;
- int next_handle_;
+ int next_id_;
DISALLOW_COPY_AND_ASSIGN(Service);
};

Powered by Google App Engine
This is Rietveld 408576698