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

Side by Side Diff: chrome/browser/ui/webui/extensions/install_extension_handler.cc

Issue 10448037: Fix regression when off-store install is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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 "chrome/browser/ui/webui/extensions/install_extension_handler.h" 5 #include "chrome/browser/ui/webui/extensions/install_extension_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_install_ui.h" 10 #include "chrome/browser/extensions/extension_install_ui.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (file_to_install_.empty()) { 75 if (file_to_install_.empty()) {
76 LOG(ERROR) << "No file captured to install."; 76 LOG(ERROR) << "No file captured to install.";
77 return; 77 return;
78 } 78 }
79 79
80 Profile* profile = Profile::FromWebUI(web_ui()); 80 Profile* profile = Profile::FromWebUI(web_ui());
81 scoped_refptr<CrxInstaller> crx_installer( 81 scoped_refptr<CrxInstaller> crx_installer(
82 CrxInstaller::Create( 82 CrxInstaller::Create(
83 ExtensionSystem::Get(profile)->extension_service(), 83 ExtensionSystem::Get(profile)->extension_service(),
84 new ExtensionInstallUI(profile))); 84 new ExtensionInstallUI(profile)));
85 crx_installer->set_allow_off_store_install(true);
85 crx_installer->InstallCrx(file_to_install_); 86 crx_installer->InstallCrx(file_to_install_);
86 87
87 file_to_install_.clear(); 88 file_to_install_.clear();
88 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698