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

Side by Side Diff: chrome/browser/ui/webui/extensions/install_extension_handler.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
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 void InstallExtensionHandler::GetLocalizedValues( 30 void InstallExtensionHandler::GetLocalizedValues(
31 DictionaryValue* localized_strings) { 31 DictionaryValue* localized_strings) {
32 DCHECK(localized_strings); 32 DCHECK(localized_strings);
33 localized_strings->SetString( 33 localized_strings->SetString(
34 "extensionSettingsInstallDropTarget", 34 "extensionSettingsInstallDropTarget",
35 l10n_util::GetStringUTF16(IDS_EXTENSIONS_INSTALL_DROP_TARGET)); 35 l10n_util::GetStringUTF16(IDS_EXTENSIONS_INSTALL_DROP_TARGET));
36 localized_strings->SetBoolean( 36 localized_strings->SetBoolean(
37 "offStoreInstallEnabled", 37 "offStoreInstallEnabled",
38 extensions::switch_utils::IsOffStoreInstallEnabled()); 38 extensions::switch_utils::IsEasyOffStoreInstallEnabled());
39 } 39 }
40 40
41 void InstallExtensionHandler::RegisterMessages() { 41 void InstallExtensionHandler::RegisterMessages() {
42 web_ui()->RegisterMessageCallback( 42 web_ui()->RegisterMessageCallback(
43 "startDrag", 43 "startDrag",
44 base::Bind(&InstallExtensionHandler::HandleStartDragMessage, 44 base::Bind(&InstallExtensionHandler::HandleStartDragMessage,
45 base::Unretained(this))); 45 base::Unretained(this)));
46 web_ui()->RegisterMessageCallback( 46 web_ui()->RegisterMessageCallback(
47 "stopDrag", 47 "stopDrag",
48 base::Bind(&InstallExtensionHandler::HandleStopDragMessage, 48 base::Bind(&InstallExtensionHandler::HandleStopDragMessage,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } else if (EndsWith(file_to_install_.BaseName().value(), 99 } else if (EndsWith(file_to_install_.BaseName().value(),
100 FILE_PATH_LITERAL(".crx"), 100 FILE_PATH_LITERAL(".crx"),
101 kCaseSensitive)) { 101 kCaseSensitive)) {
102 crx_installer->InstallCrx(file_to_install_); 102 crx_installer->InstallCrx(file_to_install_);
103 } else { 103 } else {
104 CHECK(false); 104 CHECK(false);
105 } 105 }
106 106
107 file_to_install_.clear(); 107 file_to_install_.clear();
108 } 108 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698