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

Side by Side Diff: chrome/browser/extensions/extension_installer.cc

Issue 381553002: Update the CrxInstaller and UnpackedInstaller to use the ExtensionInstallChecker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved include to correct file Created 6 years, 5 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
(Empty)
1 // Copyright (c) 2013 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 #include "chrome/browser/extensions/extension_installer.h"
6
7 #include "base/bind.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "content/public/browser/browser_thread.h"
10 #include "extensions/browser/extension_system.h"
11 #include "extensions/browser/management_policy.h"
12
13 namespace extensions {
14
15 ExtensionInstaller::ExtensionInstaller(Profile* profile)
16 : requirements_checker_(new RequirementsChecker()),
17 profile_(profile),
18 weak_ptr_factory_(this) {
19 }
20
21 ExtensionInstaller::~ExtensionInstaller() {
22 }
23
24 void ExtensionInstaller::CheckRequirements(
25 const RequirementsCallback& callback) {
26 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
27 requirements_checker_->Check(extension_, callback);
28 }
29
30 base::string16 ExtensionInstaller::CheckManagementPolicy() {
31 base::string16 error;
32 bool allowed = ExtensionSystem::Get(profile_)->management_policy()
33 ->UserMayLoad(extension_.get(), &error);
34 DCHECK(allowed || !error.empty());
35 return error;
36 }
37
38 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_installer.h ('k') | chrome/browser/extensions/unpacked_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698