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

Side by Side Diff: chrome/browser/ui/webui/extensions/install_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/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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 DLOG(ERROR) << "No current drop data."; 59 DLOG(ERROR) << "No current drop data.";
60 return; 60 return;
61 } 61 }
62 62
63 if (drop_data->filenames.empty()) { 63 if (drop_data->filenames.empty()) {
64 DLOG(ERROR) << "Current drop data contains no files."; 64 DLOG(ERROR) << "Current drop data contains no files.";
65 return; 65 return;
66 } 66 }
67 67
68 file_to_install_ = base::FilePath::FromWStringHack( 68 file_to_install_ = base::FilePath::FromWStringHack(
69 UTF16ToWide(drop_data->filenames.front().path)); 69 base::UTF16ToWide(drop_data->filenames.front().path));
70 } 70 }
71 71
72 void InstallExtensionHandler::HandleStopDragMessage(const ListValue* args) { 72 void InstallExtensionHandler::HandleStopDragMessage(const ListValue* args) {
73 file_to_install_.clear(); 73 file_to_install_.clear();
74 } 74 }
75 75
76 void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) { 76 void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) {
77 if (file_to_install_.empty()) { 77 if (file_to_install_.empty()) {
78 LOG(ERROR) << "No file captured to install."; 78 LOG(ERROR) << "No file captured to install.";
79 return; 79 return;
(...skipping 23 matching lines...) Expand all
103 } else if (EndsWith(file_to_install_.BaseName().value(), 103 } else if (EndsWith(file_to_install_.BaseName().value(),
104 FILE_PATH_LITERAL(".crx"), 104 FILE_PATH_LITERAL(".crx"),
105 kCaseSensitive)) { 105 kCaseSensitive)) {
106 crx_installer->InstallCrx(file_to_install_); 106 crx_installer->InstallCrx(file_to_install_);
107 } else { 107 } else {
108 CHECK(false); 108 CHECK(false);
109 } 109 }
110 110
111 file_to_install_.clear(); 111 file_to_install_.clear();
112 } 112 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/web_applications/web_app_ui.cc ('k') | chrome/browser/ui/webui/extensions/pack_extension_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698