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

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

Issue 12321061: Pulling user experiment code from BrowserDistribution to a new class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding GetUserDataPaths() to BrowserDistribution; replacing Product with other params in LaunchUser… Created 7 years, 9 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_browser_operations.h" 5 #include "chrome/installer/util/chrome_browser_operations.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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/installer/util/browser_distribution.h" 12 #include "chrome/installer/util/browser_distribution.h"
13 #include "chrome/installer/util/channel_info.h" 13 #include "chrome/installer/util/channel_info.h"
14 #include "chrome/installer/util/helper.h" 14 #include "chrome/installer/util/helper.h"
15 #include "chrome/installer/util/install_util.h" 15 #include "chrome/installer/util/install_util.h"
16 #include "chrome/installer/util/master_preferences.h" 16 #include "chrome/installer/util/master_preferences.h"
17 #include "chrome/installer/util/master_preferences_constants.h" 17 #include "chrome/installer/util/master_preferences_constants.h"
18 #include "chrome/installer/util/shell_util.h" 18 #include "chrome/installer/util/shell_util.h"
19 #include "chrome/installer/util/user_experiment.h"
19 #include "chrome/installer/util/util_constants.h" 20 #include "chrome/installer/util/util_constants.h"
20 21
21 namespace installer { 22 namespace installer {
22 23
23 void ChromeBrowserOperations::ReadOptions( 24 void ChromeBrowserOperations::ReadOptions(
24 const MasterPreferences& prefs, 25 const MasterPreferences& prefs,
25 std::set<std::wstring>* options) const { 26 std::set<std::wstring>* options) const {
26 DCHECK(options); 27 DCHECK(options);
27 28
28 bool pref_value; 29 bool pref_value;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 bool is_per_user_install = 130 bool is_per_user_install =
130 InstallUtil::IsPerUserInstall(target_exe.value().c_str()); 131 InstallUtil::IsPerUserInstall(target_exe.value().c_str());
131 properties->set_app_id( 132 properties->set_app_id(
132 ShellUtil::GetBrowserModelId(dist, is_per_user_install)); 133 ShellUtil::GetBrowserModelId(dist, is_per_user_install));
133 } 134 }
134 135
135 if (!properties->has_description()) 136 if (!properties->has_description())
136 properties->set_description(dist->GetAppDescription()); 137 properties->set_description(dist->GetAppDescription());
137 } 138 }
138 139
140 void ChromeBrowserOperations::LaunchUserExperiment(
141 const base::FilePath& setup_path,
142 const std::set<std::wstring>& options,
143 BrowserDistribution* dist,
144 InstallStatus status,
145 bool system_level) const {
146 CommandLine base_command(setup_path);
147 AppendProductFlags(options, &base_command);
148 installer::LaunchUserExperiment(base_command, dist, status, system_level);
149 }
150
139 } // namespace installer 151 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698