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_EXTENSIONS_EXTENSION_INFO_MAP_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Returns the time the extension was installed, or base::Time() if not found. | 46 // Returns the time the extension was installed, or base::Time() if not found. |
47 base::Time GetInstallTime(const std::string& extension_id) const; | 47 base::Time GetInstallTime(const std::string& extension_id) const; |
48 | 48 |
49 // Returns true if the user has allowed this extension to run in incognito | 49 // Returns true if the user has allowed this extension to run in incognito |
50 // mode. | 50 // mode. |
51 bool IsIncognitoEnabled(const std::string& extension_id) const; | 51 bool IsIncognitoEnabled(const std::string& extension_id) const; |
52 | 52 |
53 // Returns true if the given extension can see events and data from another | 53 // Returns true if the given extension can see events and data from another |
54 // sub-profile (incognito to original profile, or vice versa). | 54 // sub-profile (incognito to original profile, or vice versa). |
55 bool CanCrossIncognito(const extensions::Extension* extension); | 55 bool CanCrossIncognito(const extensions::Extension* extension) const; |
56 | 56 |
57 // Adds an entry to process_map_. | 57 // Adds an entry to process_map_. |
58 void RegisterExtensionProcess(const std::string& extension_id, | 58 void RegisterExtensionProcess(const std::string& extension_id, |
59 int process_id, | 59 int process_id, |
60 int site_instance_id); | 60 int site_instance_id); |
61 | 61 |
62 // Removes an entry from process_map_. | 62 // Removes an entry from process_map_. |
63 void UnregisterExtensionProcess(const std::string& extension_id, | 63 void UnregisterExtensionProcess(const std::string& extension_id, |
64 int process_id, | 64 int process_id, |
65 int site_instance_id); | 65 int site_instance_id); |
(...skipping 26 matching lines...) Expand all Loading... |
92 // Used by dispatchers to limit API quota for individual extensions. | 92 // Used by dispatchers to limit API quota for individual extensions. |
93 // The ExtensionQutoaService is not thread safe. We need to create and destroy | 93 // The ExtensionQutoaService is not thread safe. We need to create and destroy |
94 // it on the IO thread. | 94 // it on the IO thread. |
95 scoped_ptr<ExtensionsQuotaService> quota_service_; | 95 scoped_ptr<ExtensionsQuotaService> quota_service_; |
96 | 96 |
97 // Assignment of extensions to processes. | 97 // Assignment of extensions to processes. |
98 extensions::ProcessMap process_map_; | 98 extensions::ProcessMap process_map_; |
99 }; | 99 }; |
100 | 100 |
101 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ | 101 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
OLD | NEW |