OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 ExtensionState(); | 88 ExtensionState(); |
89 ~ExtensionState(); | 89 ~ExtensionState(); |
90 bool Equals(const ExtensionState &other) const; | 90 bool Equals(const ExtensionState &other) const; |
91 | 91 |
92 EnabledState enabled_state; | 92 EnabledState enabled_state; |
93 int disable_reasons; | 93 int disable_reasons; |
94 bool incognito_enabled; | 94 bool incognito_enabled; |
95 }; | 95 }; |
96 | 96 |
97 typedef std::map<std::string, ExtensionState> ExtensionStateMap; | 97 using ExtensionStateMap = std::map<std::string, ExtensionState>; |
98 typedef std::map<std::string, scoped_refptr<extensions::Extension> > | 98 using ExtensionNameMap = |
99 ExtensionNameMap; | 99 std::map<std::string, scoped_refptr<extensions::Extension>>; |
100 typedef std::map<Profile*, ExtensionNameMap> ProfileExtensionNameMap; | 100 using ProfileExtensionNameMap = std::map<Profile*, ExtensionNameMap>; |
101 typedef std::map<std::string, std::string> StringMap; | 101 using StringMap = std::map<std::string, std::string>; |
102 typedef std::map<std::string, extensions::Manifest::Type> TypeMap; | 102 using TypeMap = std::map<std::string, extensions::Manifest::Type>; |
103 | 103 |
104 friend struct base::DefaultSingletonTraits<SyncExtensionHelper>; | 104 friend struct base::DefaultSingletonTraits<SyncExtensionHelper>; |
105 | 105 |
106 SyncExtensionHelper(); | 106 SyncExtensionHelper(); |
107 ~SyncExtensionHelper(); | 107 ~SyncExtensionHelper(); |
108 | 108 |
109 // Returns a map from |profile|'s installed extensions to their state. | 109 // Returns a map from |profile|'s installed extensions to their state. |
110 static ExtensionStateMap GetExtensionStates(Profile* profile); | 110 static ExtensionStateMap GetExtensionStates(Profile* profile); |
111 | 111 |
112 // Initializes extensions for |profile| and creates an entry in | 112 // Initializes extensions for |profile| and creates an entry in |
(...skipping 10 matching lines...) Expand all Loading... |
123 std::string extension_name_prefix_; | 123 std::string extension_name_prefix_; |
124 ProfileExtensionNameMap profile_extensions_; | 124 ProfileExtensionNameMap profile_extensions_; |
125 StringMap id_to_name_; | 125 StringMap id_to_name_; |
126 TypeMap id_to_type_; | 126 TypeMap id_to_type_; |
127 bool setup_completed_; | 127 bool setup_completed_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(SyncExtensionHelper); | 129 DISALLOW_COPY_AND_ASSIGN(SyncExtensionHelper); |
130 }; | 130 }; |
131 | 131 |
132 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_ | 132 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_ |
OLD | NEW |