summaryrefslogtreecommitdiffstats
path: root/chrome/browser/apps/drive/drive_service_bridge.h
blob: 7bc1ea4e65ca41b4249046f98754ff8175af8058 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_APPS_DRIVE_DRIVE_SERVICE_BRIDGE_H_
#define CHROME_BROWSER_APPS_DRIVE_DRIVE_SERVICE_BRIDGE_H_

#include <set>

#include "base/memory/scoped_ptr.h"

namespace drive {
class DriveAppRegistry;
}

class BrowserContextKeyedServiceFactory;
class Profile;

// An interface to access Drive service for a given profile.
class DriveServiceBridge {
 public:
  virtual ~DriveServiceBridge() {}

  // Factory to create an instance of DriveServiceBridge.
  static scoped_ptr<DriveServiceBridge> Create(Profile* profile);

  // Appends PKS factories this class depends on.
  static void AppendDependsOnFactories(
      std::set<BrowserContextKeyedServiceFactory*>* factories);

  // Returns the DriveAppRegistery to use. The ownership is not transferred.
  virtual drive::DriveAppRegistry* GetAppRegistry() = 0;
};

#endif  // CHROME_BROWSER_APPS_DRIVE_DRIVE_SERVICE_BRIDGE_H_