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

Side by Side Diff: chrome/browser/ui/views/extensions/native_app_window_views.cc

Issue 14011005: Use path service for chrome_exe instead of current command line. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/app_list/app_list_controller_win.cc ('k') | no next file » | 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/views/extensions/native_app_window_views.h" 5 #include "chrome/browser/ui/views/extensions/native_app_window_views.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 shortcut_info.url, 89 shortcut_info.url,
90 shortcut_info.extension_id, 90 shortcut_info.extension_id,
91 shortcut_info.profile_path); 91 shortcut_info.profile_path);
92 92
93 // TODO(benwells): Change this to use app_host.exe. 93 // TODO(benwells): Change this to use app_host.exe.
94 base::FilePath chrome_exe; 94 base::FilePath chrome_exe;
95 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { 95 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
96 NOTREACHED(); 96 NOTREACHED();
97 return; 97 return;
98 } 98 }
99 command_line.SetProgram(CommandLine::ForCurrentProcess()->GetProgram()); 99 command_line.SetProgram(chrome_exe);
100 ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(), 100 ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(),
101 shortcut_info.title, hwnd); 101 shortcut_info.title, hwnd);
102 102
103 if (!file_util::PathExists(web_app_path) && 103 if (!file_util::PathExists(web_app_path) &&
104 !file_util::CreateDirectory(web_app_path)) { 104 !file_util::CreateDirectory(web_app_path)) {
105 return; 105 return;
106 } 106 }
107 ui::win::SetAppIconForWindow(icon_file.value(), hwnd); 107 ui::win::SetAppIconForWindow(icon_file.value(), hwnd);
108 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info.favicon); 108 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info.favicon);
109 } 109 }
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 } 698 }
699 699
700 //------------------------------------------------------------------------------ 700 //------------------------------------------------------------------------------
701 // NativeAppWindow::Create 701 // NativeAppWindow::Create
702 702
703 // static 703 // static
704 NativeAppWindow* NativeAppWindow::Create( 704 NativeAppWindow* NativeAppWindow::Create(
705 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 705 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
706 return new NativeAppWindowViews(shell_window, params); 706 return new NativeAppWindowViews(shell_window, params);
707 } 707 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/app_list/app_list_controller_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698