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

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

Issue 10511015: Rename --enable-off-store-extension-install to --enable-easy-off... (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/extensions/extension_install_ui.h" 5 #include "chrome/browser/extensions/extension_install_ui.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 // We special-case themes to not show any confirm UI. Instead they are 322 // We special-case themes to not show any confirm UI. Instead they are
323 // immediately installed, and then we show an infobar (see OnInstallSuccess) 323 // immediately installed, and then we show an infobar (see OnInstallSuccess)
324 // to allow the user to revert if they don't like it. 324 // to allow the user to revert if they don't like it.
325 // 325 //
326 // We don't do this in the case where off-store extension installs are 326 // We don't do this in the case where off-store extension installs are
327 // disabled because in that case, we don't show the dangerous download UI, so 327 // disabled because in that case, we don't show the dangerous download UI, so
328 // we need the UI confirmation. 328 // we need the UI confirmation.
329 if (extension->is_theme()) { 329 if (extension->is_theme()) {
330 if (extension->from_webstore() || 330 if (extension->from_webstore() ||
331 extensions::switch_utils::IsOffStoreInstallEnabled()) { 331 extensions::switch_utils::IsEasyOffStoreInstallEnabled()) {
332 delegate->InstallUIProceed(); 332 delegate->InstallUIProceed();
333 return; 333 return;
334 } 334 }
335 } 335 }
336 336
337 LoadImageIfNeeded(); 337 LoadImageIfNeeded();
338 } 338 }
339 339
340 void ExtensionInstallUI::ConfirmReEnable(Delegate* delegate, 340 void ExtensionInstallUI::ConfirmReEnable(Delegate* delegate,
341 const Extension* extension) { 341 const Extension* extension) {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 bool previous_using_native_theme) { 555 bool previous_using_native_theme) {
556 Profile* profile = tab_contents->profile(); 556 Profile* profile = tab_contents->profile();
557 return new ThemeInstalledInfoBarDelegate( 557 return new ThemeInstalledInfoBarDelegate(
558 tab_contents->infobar_tab_helper(), 558 tab_contents->infobar_tab_helper(),
559 profile->GetExtensionService(), 559 profile->GetExtensionService(),
560 ThemeServiceFactory::GetForProfile(profile), 560 ThemeServiceFactory::GetForProfile(profile),
561 new_theme, 561 new_theme,
562 previous_theme_id, 562 previous_theme_id,
563 previous_using_native_theme); 563 previous_using_native_theme);
564 } 564 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698