OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 bool InSameExtent(const GURL& old_url, const GURL& new_url) const; | 50 bool InSameExtent(const GURL& old_url, const GURL& new_url) const; |
51 | 51 |
52 // Look up an Extension object by id. | 52 // Look up an Extension object by id. |
53 const Extension* GetByID(const std::string& id) const; | 53 const Extension* GetByID(const std::string& id) const; |
54 | 54 |
55 // Returns true if |url| should get extension api bindings and be permitted | 55 // Returns true if |url| should get extension api bindings and be permitted |
56 // to make api calls. Note that this is independent of what extension | 56 // to make api calls. Note that this is independent of what extension |
57 // permissions the given extension has been granted. | 57 // permissions the given extension has been granted. |
58 bool ExtensionBindingsAllowed(const GURL& url) const; | 58 bool ExtensionBindingsAllowed(const GURL& url) const; |
59 | 59 |
60 // Populates map with the path and default locale for all extension IDs. | |
61 void GetExtensionsPathAndDefaultLocale( | |
Nebojša Ćirić
2011/08/10 20:38:57
Do you need this method? Couldn't you just:
make_
adriansc
2011/08/10 23:20:53
This method fills in a map by repeatedly calling m
| |
62 std::map<std::string, std::pair<FilePath, std::string> >& info) const; | |
Nebojša Ćirić
2011/08/10 20:38:57
You could typedef it here as ExtensionPathAndDefau
adriansc
2011/08/10 23:20:53
Done.
| |
63 | |
60 private: | 64 private: |
61 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); | 65 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); |
62 | 66 |
63 // static | 67 // static |
64 typedef std::map<std::string, scoped_refptr<const Extension> > ExtensionMap; | 68 typedef std::map<std::string, scoped_refptr<const Extension> > ExtensionMap; |
65 ExtensionMap extensions_; | 69 ExtensionMap extensions_; |
66 | 70 |
67 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); | 71 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); |
68 }; | 72 }; |
69 | 73 |
70 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ | 74 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SET_H_ |
OLD | NEW |