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

Side by Side Diff: extensions/browser/policy_check.h

Issue 2693373003: PreloadCheck class for extension pre-install checks (Closed)
Patch Set: don't break enable_extensions=false Created 3 years, 9 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
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/policy_check.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_BROWSER_POLICY_CHECK_H_
6 #define EXTENSIONS_BROWSER_POLICY_CHECK_H_
7
8 #include "base/macros.h"
9 #include "base/strings/string16.h"
10 #include "extensions/browser/preload_check.h"
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace extensions {
17
18 class Extension;
19
20 // Checks whether loading this extension is disabled by policy. Synchronously
21 // calls the callback with the result.
22 class PolicyCheck : public PreloadCheck {
23 public:
24 PolicyCheck(content::BrowserContext* context,
25 scoped_refptr<const Extension> extension);
26 ~PolicyCheck() override;
27
28 // PreloadCheck:
29 void Start(ResultCallback callback) override;
30 base::string16 GetErrorMessage() const override;
31
32 private:
33 content::BrowserContext* context_;
34 base::string16 error_;
35
36 DISALLOW_COPY_AND_ASSIGN(PolicyCheck);
37 };
38
39 } // namespace extensions
40
41 #endif // EXTENSIONS_BROWSER_POLICY_CHECK_H_
OLDNEW
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/policy_check.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698