Chromium Code Reviews| 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_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h" | 16 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h" |
| 17 #include "chrome/browser/extensions/extension_menu_manager.h" | 17 #include "chrome/browser/extensions/extension_menu_manager.h" |
| 18 #include "chrome/browser/extensions/extension_prefs_scope.h" | 18 #include "chrome/browser/extensions/extension_prefs_scope.h" |
| 19 #include "chrome/browser/extensions/extension_scoped_prefs.h" | 19 #include "chrome/browser/extensions/extension_scoped_prefs.h" |
| 20 #include "chrome/browser/extensions/management_policy.h" | 20 #include "chrome/browser/extensions/management_policy.h" |
| 21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
| 22 #include "chrome/common/extensions/url_pattern_set.h" | |
| 22 #include "chrome/common/string_ordinal.h" | 23 #include "chrome/common/string_ordinal.h" |
| 23 | 24 |
| 24 class ExtensionPrefValueMap; | 25 class ExtensionPrefValueMap; |
| 25 class ExtensionSorting; | 26 class ExtensionSorting; |
| 26 class PrefService; | 27 class PrefService; |
| 27 class URLPatternSet; | 28 class URLPatternSet; |
| 28 | 29 |
| 29 namespace extensions { | 30 namespace extensions { |
| 30 struct AlarmPref; | 31 struct AlarmPref; |
| 31 struct ExtensionOmniboxSuggestion; | 32 struct ExtensionOmniboxSuggestion; |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 425 } | 426 } |
| 426 | 427 |
| 427 // The underlying PrefService. | 428 // The underlying PrefService. |
| 428 PrefService* pref_service() const { return prefs_; } | 429 PrefService* pref_service() const { return prefs_; } |
| 429 | 430 |
| 430 // The underlying ExtensionSorting. | 431 // The underlying ExtensionSorting. |
| 431 ExtensionSorting* extension_sorting() const { | 432 ExtensionSorting* extension_sorting() const { |
| 432 return extension_sorting_.get(); | 433 return extension_sorting_.get(); |
| 433 } | 434 } |
| 434 | 435 |
| 436 URLPatternSet GetAllowedInstallSites(); | |
|
Yoyo Zhou
2012/06/07 19:19:15
Should have some sort of comment on what this is.
Aaron Boodman
2012/06/07 22:37:11
Done.
| |
| 437 | |
| 435 protected: | 438 protected: |
| 436 // For unit testing. Enables injecting an artificial clock that is used | 439 // For unit testing. Enables injecting an artificial clock that is used |
| 437 // to query the current time, when an extension is installed. | 440 // to query the current time, when an extension is installed. |
| 438 virtual base::Time GetCurrentTime() const; | 441 virtual base::Time GetCurrentTime() const; |
| 439 | 442 |
| 440 private: | 443 private: |
| 441 friend class ExtensionPrefsUninstallExtension; // Unit test. | 444 friend class ExtensionPrefsUninstallExtension; // Unit test. |
| 442 | 445 |
| 443 // extensions::ContentSettingsStore::Observer methods: | 446 // extensions::ContentSettingsStore::Observer methods: |
| 444 virtual void OnContentSettingChanged( | 447 virtual void OnContentSettingChanged( |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 552 // Contains all the logic for handling the order for various extension | 555 // Contains all the logic for handling the order for various extension |
| 553 // properties. | 556 // properties. |
| 554 scoped_ptr<ExtensionSorting> extension_sorting_; | 557 scoped_ptr<ExtensionSorting> extension_sorting_; |
| 555 | 558 |
| 556 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; | 559 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; |
| 557 | 560 |
| 558 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 561 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 559 }; | 562 }; |
| 560 | 563 |
| 561 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 564 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |