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

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

Issue 1125353002: Make extensions developer mode warning controllable by experiments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win compile problem with unreached code Created 5 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_INSTALL_VERIFIER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 // written into the extension preferences and is checked for validity when 38 // written into the extension preferences and is checked for validity when
39 // being read back again. 39 // being read back again.
40 // 40 //
41 // This class should be kept notified of runtime changes to the set of 41 // This class should be kept notified of runtime changes to the set of
42 // extensions installed from the webstore. 42 // extensions installed from the webstore.
43 class InstallVerifier : public ManagementPolicy::Provider { 43 class InstallVerifier : public ManagementPolicy::Provider {
44 public: 44 public:
45 InstallVerifier(ExtensionPrefs* prefs, content::BrowserContext* context); 45 InstallVerifier(ExtensionPrefs* prefs, content::BrowserContext* context);
46 ~InstallVerifier() override; 46 ~InstallVerifier() override;
47 47
48 // Returns whether install verification should be enforced.
49 static bool ShouldEnforce();
50
48 // Returns whether |extension| is of a type that needs verification. 51 // Returns whether |extension| is of a type that needs verification.
49 static bool NeedsVerification(const Extension& extension); 52 static bool NeedsVerification(const Extension& extension);
50 53
51 // Determines if an extension claims to be from the webstore. 54 // Determines if an extension claims to be from the webstore.
52 static bool IsFromStore(const Extension& extension); 55 static bool IsFromStore(const Extension& extension);
53 56
54 // Initializes this object for use, including reading preferences and 57 // Initializes this object for use, including reading preferences and
55 // validating the stored signature. 58 // validating the stored signature.
56 void Init(); 59 void Init();
57 60
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ExtensionIdSet provisional_; 172 ExtensionIdSet provisional_;
170 173
171 base::WeakPtrFactory<InstallVerifier> weak_factory_; 174 base::WeakPtrFactory<InstallVerifier> weak_factory_;
172 175
173 DISALLOW_COPY_AND_ASSIGN(InstallVerifier); 176 DISALLOW_COPY_AND_ASSIGN(InstallVerifier);
174 }; 177 };
175 178
176 } // namespace extensions 179 } // namespace extensions
177 180
178 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ 181 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/dev_mode_bubble_controller.cc ('k') | chrome/browser/extensions/install_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698