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

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

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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) 2013 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/extensions/extension_installer.h" 5 #include "chrome/browser/extensions/extension_installer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/extensions/management_policy.h" 9 #include "chrome/browser/extensions/management_policy.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void ExtensionInstaller::CheckRequirements( 24 void ExtensionInstaller::CheckRequirements(
25 const RequirementsCallback& callback) { 25 const RequirementsCallback& callback) {
26 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 26 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
27 requirements_checker_->Check(extension_, callback); 27 requirements_checker_->Check(extension_, callback);
28 } 28 }
29 29
30 string16 ExtensionInstaller::CheckManagementPolicy() { 30 string16 ExtensionInstaller::CheckManagementPolicy() {
31 string16 error; 31 string16 error;
32 bool allowed = 32 bool allowed = ExtensionSystem::Get(profile_)->management_policy()
33 ExtensionSystem::Get(profile_)->management_policy()->UserMayLoad( 33 ->UserMayLoad(extension_.get(), &error);
34 extension_, &error);
35 DCHECK(allowed || !error.empty()); 34 DCHECK(allowed || !error.empty());
36 return error; 35 return error;
37 } 36 }
38 37
39 } // namespace extensions 38 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.cc ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698