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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... | |
26 #include "extensions/browser/management_policy.h" | 26 #include "extensions/browser/management_policy.h" |
27 #include "extensions/browser/process_manager.h" | 27 #include "extensions/browser/process_manager.h" |
28 #include "extensions/browser/uninstall_reason.h" | 28 #include "extensions/browser/uninstall_reason.h" |
29 #include "extensions/common/extension.h" | 29 #include "extensions/common/extension.h" |
30 #include "extensions/common/extension_set.h" | 30 #include "extensions/common/extension_set.h" |
31 #include "extensions/common/manifest.h" | 31 #include "extensions/common/manifest.h" |
32 #include "sync/api/string_ordinal.h" | 32 #include "sync/api/string_ordinal.h" |
33 | 33 |
34 class ExtensionSyncService; | 34 class ExtensionSyncService; |
35 class GURL; | 35 class GURL; |
36 class HostContentSettingsMap; | |
36 class Profile; | 37 class Profile; |
37 | 38 |
38 namespace base { | 39 namespace base { |
39 class CommandLine; | 40 class CommandLine; |
40 class SequencedTaskRunner; | 41 class SequencedTaskRunner; |
41 class Version; | 42 class Version; |
42 } | 43 } |
43 | 44 |
44 namespace content { | 45 namespace content { |
45 class DevToolsAgentHost; | 46 class DevToolsAgentHost; |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
355 // NOTE: If this is ever called with high frequency, the implementation may | 356 // NOTE: If this is ever called with high frequency, the implementation may |
356 // need to be made more efficient. | 357 // need to be made more efficient. |
357 static void RecordPermissionMessagesHistogram( | 358 static void RecordPermissionMessagesHistogram( |
358 const extensions::Extension* extension, const char* histogram); | 359 const extensions::Extension* extension, const char* histogram); |
359 | 360 |
360 // Unloads the given extension and mark the extension as terminated. This | 361 // Unloads the given extension and mark the extension as terminated. This |
361 // doesn't notify the user that the extension was terminated, if such a | 362 // doesn't notify the user that the extension was terminated, if such a |
362 // notification is desired the calling code is responsible for doing that. | 363 // notification is desired the calling code is responsible for doing that. |
363 void TerminateExtension(const std::string& extension_id); | 364 void TerminateExtension(const std::string& extension_id); |
364 | 365 |
366 // Register myself and content settings API to the specified map. | |
Yoyo Zhou
2014/09/08 19:51:26
Change 'myself' to 'self' and 'to' to 'with'
Jun Mukai
2014/09/08 20:01:39
Done.
| |
367 void RegisterContentSettings( | |
368 HostContentSettingsMap* host_content_settings_map); | |
369 | |
365 // Adds/Removes update observers. | 370 // Adds/Removes update observers. |
366 void AddUpdateObserver(extensions::UpdateObserver* observer); | 371 void AddUpdateObserver(extensions::UpdateObserver* observer); |
367 void RemoveUpdateObserver(extensions::UpdateObserver* observer); | 372 void RemoveUpdateObserver(extensions::UpdateObserver* observer); |
368 | 373 |
369 ////////////////////////////////////////////////////////////////////////////// | 374 ////////////////////////////////////////////////////////////////////////////// |
370 // Simple Accessors | 375 // Simple Accessors |
371 | 376 |
372 // Returns a WeakPtr to the ExtensionService. | 377 // Returns a WeakPtr to the ExtensionService. |
373 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } | 378 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } |
374 | 379 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 GreylistedExtensionDisabled); | 732 GreylistedExtensionDisabled); |
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 733 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
729 GreylistDontEnableManuallyDisabled); | 734 GreylistDontEnableManuallyDisabled); |
730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 735 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
731 GreylistUnknownDontChange); | 736 GreylistUnknownDontChange); |
732 | 737 |
733 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 738 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
734 }; | 739 }; |
735 | 740 |
736 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 741 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |