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

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

Issue 384423002: [Canceled] Extensions: Add install_flags parameter to ManagementPolicy::UserMayLoad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update tests 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 | 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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/download/download_crx_util.h" 8 #include "chrome/browser/download/download_crx_util.h"
9 #include "chrome/browser/extensions/browser_action_test_util.h" 9 #include "chrome/browser/extensions/browser_action_test_util.h"
10 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 class ManagementPolicyMock : public extensions::ManagementPolicy::Provider { 142 class ManagementPolicyMock : public extensions::ManagementPolicy::Provider {
143 public: 143 public:
144 ManagementPolicyMock() {} 144 ManagementPolicyMock() {}
145 145
146 virtual std::string GetDebugPolicyProviderName() const OVERRIDE { 146 virtual std::string GetDebugPolicyProviderName() const OVERRIDE {
147 return "ManagementPolicyMock"; 147 return "ManagementPolicyMock";
148 } 148 }
149 149
150 virtual bool UserMayLoad(const Extension* extension, 150 virtual bool UserMayLoad(const Extension* extension,
151 int install_flags,
151 base::string16* error) const OVERRIDE { 152 base::string16* error) const OVERRIDE {
152 *error = base::UTF8ToUTF16("Dummy error message"); 153 *error = base::UTF8ToUTF16("Dummy error message");
153 return false; 154 return false;
154 } 155 }
155 }; 156 };
156 157
157 } // namespace 158 } // namespace
158 159
159 class ExtensionCrxInstallerTest : public ExtensionBrowserTest { 160 class ExtensionCrxInstallerTest : public ExtensionBrowserTest {
160 public: 161 public:
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 ManagementPolicyMock policy; 572 ManagementPolicyMock policy;
572 extensions::ExtensionSystem::Get(profile()) 573 extensions::ExtensionSystem::Get(profile())
573 ->management_policy() 574 ->management_policy()
574 ->RegisterProvider(&policy); 575 ->RegisterProvider(&policy);
575 576
576 base::FilePath crx_path = test_data_dir_.AppendASCII("crx_installer/v1.crx"); 577 base::FilePath crx_path = test_data_dir_.AppendASCII("crx_installer/v1.crx");
577 EXPECT_FALSE(InstallExtension(crx_path, 0)); 578 EXPECT_FALSE(InstallExtension(crx_path, 0));
578 } 579 }
579 580
580 } // namespace extensions 581 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_error_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698