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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/pack_extension_handler.h" 5 #include "chrome/browser/ui/webui/extensions/pack_extension_handler.h"
6 6
7 #include "chrome/browser/extensions/extension_creator.h" 7 #include "chrome/browser/extensions/extension_creator.h"
8 #include "chrome/browser/ui/chrome_select_file_policy.h" 8 #include "chrome/browser/ui/chrome_select_file_policy.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 !args->GetString(1, &private_key_path_)) 112 !args->GetString(1, &private_key_path_))
113 NOTREACHED(); 113 NOTREACHED();
114 114
115 double flags_double = 0.0; 115 double flags_double = 0.0;
116 if (!args->GetDouble(2, &flags_double)) 116 if (!args->GetDouble(2, &flags_double))
117 NOTREACHED(); 117 NOTREACHED();
118 118
119 int run_flags = static_cast<int>(flags_double); 119 int run_flags = static_cast<int>(flags_double);
120 120
121 base::FilePath root_directory = 121 base::FilePath root_directory =
122 base::FilePath::FromWStringHack(UTF8ToWide(extension_path_)); 122 base::FilePath::FromWStringHack(base::UTF8ToWide(extension_path_));
123 base::FilePath key_file = 123 base::FilePath key_file =
124 base::FilePath::FromWStringHack(UTF8ToWide(private_key_path_)); 124 base::FilePath::FromWStringHack(base::UTF8ToWide(private_key_path_));
125 125
126 if (root_directory.empty()) { 126 if (root_directory.empty()) {
127 if (extension_path_.empty()) { 127 if (extension_path_.empty()) {
128 ShowAlert(l10n_util::GetStringUTF8( 128 ShowAlert(l10n_util::GetStringUTF8(
129 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_REQUIRED)); 129 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_REQUIRED));
130 } else { 130 } else {
131 ShowAlert(l10n_util::GetStringUTF8( 131 ShowAlert(l10n_util::GetStringUTF8(
132 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_INVALID)); 132 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_INVALID));
133 } 133 }
134 134
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 FILE_PATH_LITERAL(""), 188 FILE_PATH_LITERAL(""),
189 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), 189 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
190 NULL); 190 NULL);
191 } 191 }
192 192
193 void PackExtensionHandler::ShowAlert(const std::string& message) { 193 void PackExtensionHandler::ShowAlert(const std::string& message) {
194 ListValue arguments; 194 ListValue arguments;
195 arguments.Append(Value::CreateStringValue(message)); 195 arguments.Append(Value::CreateStringValue(message));
196 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); 196 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments);
197 } 197 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/install_extension_handler.cc ('k') | chrome/browser/ui/webui/fileicon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698