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

Side by Side Diff: extensions/common/extension_set.h

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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 unified diff | Download patch
« no previous file with comments | « extensions/browser/info_map.cc ('k') | extensions/common/extension_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMMON_EXTENSIONS_EXTENSION_SET_H_ 5 #ifndef EXTENSIONS_COMMON_EXTENSION_SET_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ 6 #define EXTENSIONS_COMMON_EXTENSION_SET_H_
7 7
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "extensions/common/extension.h" 15 #include "extensions/common/extension.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 // The one true extension container. Extensions are identified by their id. 18 // The one true extension container. Extensions are identified by their id.
19 // Only one extension can be in the set with a given ID. 19 // Only one extension can be in the set with a given ID.
20 class ExtensionSet { 20 class ExtensionSet {
benwells 2013/12/04 03:48:08 This might be painful, but can you move this into
Devlin 2013/12/10 21:25:31 Sorry for the delay, and thanks for catching that.
21 public: 21 public:
22 typedef std::pair<base::FilePath, std::string> ExtensionPathAndDefaultLocale; 22 typedef std::pair<base::FilePath, std::string> ExtensionPathAndDefaultLocale;
23 typedef std::map<std::string, scoped_refptr<const extensions::Extension> > 23 typedef std::map<std::string, scoped_refptr<const extensions::Extension> >
24 ExtensionMap; 24 ExtensionMap;
25 typedef base::Callback<void(const extensions::ExtensionIdSet&)> 25 typedef base::Callback<void(const extensions::ExtensionIdSet&)>
26 ModificationCallback; 26 ModificationCallback;
27 27
28 // Iteration over the values of the map (given that it's an ExtensionSet, 28 // Iteration over the values of the map (given that it's an ExtensionSet,
29 // it should iterate like a set iterator). 29 // it should iterate like a set iterator).
30 class const_iterator : 30 class const_iterator :
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 // If non-null, called with the extension ids in this set after a modification 136 // If non-null, called with the extension ids in this set after a modification
137 // occurred. This is not called on Clear() which is typically used when 137 // occurred. This is not called on Clear() which is typically used when
138 // discarding the set (e.g., on shutdown) and we do not want to track that as 138 // discarding the set (e.g., on shutdown) and we do not want to track that as
139 // a real modification. 139 // a real modification.
140 ModificationCallback modification_callback_; 140 ModificationCallback modification_callback_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); 142 DISALLOW_COPY_AND_ASSIGN(ExtensionSet);
143 }; 143 };
144 144
145 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ 145 #endif // EXTENSIONS_COMMON_EXTENSION_SET_H_
OLDNEW
« no previous file with comments | « extensions/browser/info_map.cc ('k') | extensions/common/extension_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698