OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_APPS_DRIVE_DRIVE_APP_MAPPING_H_ |
| 6 #define CHROME_BROWSER_APPS_DRIVE_DRIVE_APP_MAPPING_H_ |
| 7 |
| 8 #include <set> |
| 9 #include <string> |
| 10 |
| 11 #include "base/macros.h" |
| 12 |
| 13 namespace user_prefs { |
| 14 class PrefRegistrySyncable; |
| 15 } |
| 16 |
| 17 class PrefService; |
| 18 |
| 19 // DriveAppMapping tracks the mapping between Drive apps and corresponding |
| 20 // Chrome apps. The data is backed by kAppLauncherDriveAppMapping pref. |
| 21 class DriveAppMapping { |
| 22 public: |
| 23 explicit DriveAppMapping(PrefService* prefs); |
| 24 ~DriveAppMapping(); |
| 25 |
| 26 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 27 |
| 28 void Add(const std::string& drive_app_id, const std::string& chrome_app_id); |
| 29 void Remove(const std::string& drive_app_id); |
| 30 |
| 31 std::string GetChromeApp(const std::string& drive_app_id) const; |
| 32 std::string GetDriveApp(const std::string& chrome_app_id) const; |
| 33 |
| 34 std::set<std::string> GetDriveAppIds() const; |
| 35 |
| 36 private: |
| 37 PrefService* prefs_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(DriveAppMapping); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_APPS_DRIVE_DRIVE_APP_MAPPING_H_ |
OLD | NEW |