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

Side by Side Diff: chrome/browser/extensions/extension_prefs.h

Issue 10542048: Add a group policy controlling which sites can install extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months 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 | Annotate | Revision Log
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_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
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 // Describes the URLs that are able to install extensions. See
437 // prefs::kExtensionAllowedInstallSites for more information.
438 URLPatternSet GetAllowedInstallSites();
439
435 protected: 440 protected:
436 // For unit testing. Enables injecting an artificial clock that is used 441 // For unit testing. Enables injecting an artificial clock that is used
437 // to query the current time, when an extension is installed. 442 // to query the current time, when an extension is installed.
438 virtual base::Time GetCurrentTime() const; 443 virtual base::Time GetCurrentTime() const;
439 444
440 private: 445 private:
441 friend class ExtensionPrefsUninstallExtension; // Unit test. 446 friend class ExtensionPrefsUninstallExtension; // Unit test.
442 447
443 // extensions::ContentSettingsStore::Observer methods: 448 // extensions::ContentSettingsStore::Observer methods:
444 virtual void OnContentSettingChanged( 449 virtual void OnContentSettingChanged(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 // Contains all the logic for handling the order for various extension 557 // Contains all the logic for handling the order for various extension
553 // properties. 558 // properties.
554 scoped_ptr<ExtensionSorting> extension_sorting_; 559 scoped_ptr<ExtensionSorting> extension_sorting_;
555 560
556 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; 561 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_;
557 562
558 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 563 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
559 }; 564 };
560 565
561 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 566 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698