#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_
#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_
#include <map>
#include <string>
#include <vector>
#include "base/observer_list.h"
#include "chrome/browser/chromeos/file_system_provider/observer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/file_system_provider.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/browser_context.h"
namespace chromeos {
namespace file_system_provider {
class ServiceFactory;
class Service : public KeyedService {
public:
explicit Service(Profile* profile);
virtual ~Service();
int RegisterFileSystem(const std::string& extension_id,
const std::string& file_system_name);
bool UnregisterFileSystem(const std::string& extension_id,
int file_system_id);
std::vector<ProvidedFileSystem> GetRegisteredFileSystems();
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
static Service* Get(content::BrowserContext* context);
private:
typedef std::map<int, ProvidedFileSystem> FileSystemMap;
Profile* profile_;
ObserverList<Observer> observers_;
FileSystemMap file_systems_;
int next_id_;
DISALLOW_COPY_AND_ASSIGN(Service);
};
}
}
#endif