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

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, 5 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(target_exe,
112 dist->GetIconIndex(BrowserDistribution::SHORTCUT_APP_LAUNCHER));
112 113
113 if (!properties->has_app_id()) { 114 if (!properties->has_app_id()) {
114 std::vector<string16> components; 115 std::vector<string16> components;
115 components.push_back(dist->GetBaseAppId()); 116 components.push_back(dist->GetBaseAppId());
116 properties->set_app_id(ShellUtil::BuildAppModelId(components)); 117 properties->set_app_id(ShellUtil::BuildAppModelId(components));
117 } 118 }
118 } 119 }
119 120
120 void ChromeAppHostOperations::LaunchUserExperiment( 121 void ChromeAppHostOperations::LaunchUserExperiment(
121 const base::FilePath& setup_path, 122 const base::FilePath& setup_path,
122 const std::set<string16>& options, 123 const std::set<string16>& options,
123 InstallStatus status, 124 InstallStatus status,
124 bool system_level) const { 125 bool system_level) const {
125 // No experiments yet. If adding some in the future, need to have 126 // No experiments yet. If adding some in the future, need to have
126 // ChromeAppHostDistribution::HasUserExperiments() return true. 127 // ChromeAppHostDistribution::HasUserExperiments() return true.
127 NOTREACHED(); 128 NOTREACHED();
128 } 129 }
129 130
130 } // namespace installer 131 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698