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

Side by Side Diff: webkit/default_plugin/plugin_impl_win.cc

Issue 2110021: Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: fix win Created 10 years, 7 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/default_plugin/plugin_impl_win.h" 5 #include "webkit/default_plugin/plugin_impl_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 DLOG(WARNING) << "Failed to download plugin"; 576 DLOG(WARNING) << "Failed to download plugin";
577 set_plugin_installer_state(PluginDownloadFailed); 577 set_plugin_installer_state(PluginDownloadFailed);
578 DisplayPluginDownloadFailedStatus(); 578 DisplayPluginDownloadFailedStatus();
579 } else { 579 } else {
580 DLOG(INFO) << "Successfully downloaded plugin installer"; 580 DLOG(INFO) << "Successfully downloaded plugin installer";
581 set_plugin_installer_state(PluginDownloadCompleted); 581 set_plugin_installer_state(PluginDownloadCompleted);
582 582
583 std::wstring file_path = 583 std::wstring file_path =
584 reinterpret_cast<const wchar_t*>(download_file_info->lpData); 584 reinterpret_cast<const wchar_t*>(download_file_info->lpData);
585 585
586 std::wstring current_directory = 586 FilePath current_directory = FilePath(file_path).DirName();
587 file_util::GetDirectoryFromPath(file_path);
588 587
589 SHELLEXECUTEINFO shell_execute_info = {0}; 588 SHELLEXECUTEINFO shell_execute_info = {0};
590 shell_execute_info.cbSize = sizeof(shell_execute_info); 589 shell_execute_info.cbSize = sizeof(shell_execute_info);
591 shell_execute_info.fMask = SEE_MASK_NOCLOSEPROCESS; 590 shell_execute_info.fMask = SEE_MASK_NOCLOSEPROCESS;
592 shell_execute_info.lpFile = file_path.c_str(); 591 shell_execute_info.lpFile = file_path.c_str();
593 shell_execute_info.lpDirectory = current_directory.c_str(); 592 shell_execute_info.lpDirectory = current_directory.value().c_str();
594 shell_execute_info.nShow = SW_SHOW; 593 shell_execute_info.nShow = SW_SHOW;
595 594
596 if (!ShellExecuteEx(&shell_execute_info)) { 595 if (!ShellExecuteEx(&shell_execute_info)) {
597 DLOG(WARNING) << "Failed to launch plugin installer " 596 DLOG(WARNING) << "Failed to launch plugin installer "
598 << file_path.c_str() << " Error " 597 << file_path.c_str() << " Error "
599 << ::GetLastError(); 598 << ::GetLastError();
600 set_plugin_installer_state(PluginInstallerLaunchFailure); 599 set_plugin_installer_state(PluginInstallerLaunchFailure);
601 DisplayStatus(IDS_DEFAULT_PLUGIN_INSTALLATION_FAILED_MSG); 600 DisplayStatus(IDS_DEFAULT_PLUGIN_INSTALLATION_FAILED_MSG);
602 NOTREACHED(); 601 NOTREACHED();
603 } else { 602 } else {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 return true; 637 return true;
639 } 638 }
640 639
641 void PluginInstallerImpl::NotifyPluginStatus(int status) { 640 void PluginInstallerImpl::NotifyPluginStatus(int status) {
642 default_plugin::g_browser->getvalue( 641 default_plugin::g_browser->getvalue(
643 instance_, 642 instance_,
644 static_cast<NPNVariable>( 643 static_cast<NPNVariable>(
645 default_plugin::kMissingPluginStatusStart + status), 644 default_plugin::kMissingPluginStatusStart + status),
646 NULL); 645 NULL);
647 } 646 }
OLDNEW
« chrome/installer/setup/uninstall.cc ('K') | « chrome/installer/setup/uninstall.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698