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

Side by Side Diff: chrome/installer/util/chrome_app_host_operations.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 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) 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/installer/util/chrome_app_host_operations.h" 5 #include "chrome/installer/util/chrome_app_host_operations.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (!properties->has_target()) 101 if (!properties->has_target())
102 properties->set_target(target_exe); 102 properties->set_target(target_exe);
103 103
104 if (!properties->has_arguments()) { 104 if (!properties->has_arguments()) {
105 CommandLine app_host_args(CommandLine::NO_PROGRAM); 105 CommandLine app_host_args(CommandLine::NO_PROGRAM);
106 app_host_args.AppendSwitch(::switches::kShowAppList); 106 app_host_args.AppendSwitch(::switches::kShowAppList);
107 properties->set_arguments(app_host_args.GetCommandLineString()); 107 properties->set_arguments(app_host_args.GetCommandLineString());
108 } 108 }
109 109
110 if (!properties->has_icon()) 110 if (!properties->has_icon())
111 properties->set_icon(target_exe, dist->GetIconIndex()); 111 properties->set_icon(
112 target_exe,
113 dist->GetShortcutInfo(BrowserDistribution::SHORTCUT_APP_LAUNCHER)
114 .icon_index);
112 115
113 if (!properties->has_app_id()) { 116 if (!properties->has_app_id()) {
114 std::vector<string16> components; 117 std::vector<string16> components;
115 components.push_back(dist->GetBaseAppId()); 118 components.push_back(dist->GetBaseAppId());
116 properties->set_app_id(ShellUtil::BuildAppModelId(components)); 119 properties->set_app_id(ShellUtil::BuildAppModelId(components));
117 } 120 }
118 } 121 }
119 122
120 void ChromeAppHostOperations::LaunchUserExperiment( 123 void ChromeAppHostOperations::LaunchUserExperiment(
121 const base::FilePath& setup_path, 124 const base::FilePath& setup_path,
122 const std::set<string16>& options, 125 const std::set<string16>& options,
123 InstallStatus status, 126 InstallStatus status,
124 bool system_level) const { 127 bool system_level) const {
125 // No experiments yet. If adding some in the future, need to have 128 // No experiments yet. If adding some in the future, need to have
126 // ChromeAppHostDistribution::HasUserExperiments() return true. 129 // ChromeAppHostDistribution::HasUserExperiments() return true.
127 NOTREACHED(); 130 NOTREACHED();
128 } 131 }
129 132
130 } // namespace installer 133 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698