OLD | NEW |
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/product.h" | 5 #include "chrome/installer/util/product.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void Product::InitializeFromPreferences(const MasterPreferences& prefs) { | 56 void Product::InitializeFromPreferences(const MasterPreferences& prefs) { |
57 operations_->ReadOptions(prefs, &options_); | 57 operations_->ReadOptions(prefs, &options_); |
58 } | 58 } |
59 | 59 |
60 void Product::InitializeFromUninstallCommand( | 60 void Product::InitializeFromUninstallCommand( |
61 const CommandLine& uninstall_command) { | 61 const CommandLine& uninstall_command) { |
62 operations_->ReadOptions(uninstall_command, &options_); | 62 operations_->ReadOptions(uninstall_command, &options_); |
63 } | 63 } |
64 | 64 |
65 void Product::GetUserDataPaths(std::vector<base::FilePath>* paths) const { | 65 base::FilePath Product::GetUserDataPath() const { |
66 GetChromeUserDataPaths(distribution_, paths); | 66 return GetChromeUserDataPath(distribution_); |
67 } | 67 } |
68 | 68 |
69 bool Product::LaunchChrome(const base::FilePath& application_path) const { | 69 bool Product::LaunchChrome(const base::FilePath& application_path) const { |
70 bool success = !application_path.empty(); | 70 bool success = !application_path.empty(); |
71 if (success) { | 71 if (success) { |
72 CommandLine cmd(application_path.Append(installer::kChromeExe)); | 72 CommandLine cmd(application_path.Append(installer::kChromeExe)); |
73 success = base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 73 success = base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
74 } | 74 } |
75 return success; | 75 return success; |
76 } | 76 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 if (distribution_->HasUserExperiments()) { | 169 if (distribution_->HasUserExperiments()) { |
170 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " | 170 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " |
171 << distribution_->GetDisplayName() | 171 << distribution_->GetDisplayName() |
172 << " system_level: " << system_level; | 172 << " system_level: " << system_level; |
173 operations_->LaunchUserExperiment( | 173 operations_->LaunchUserExperiment( |
174 setup_path, options_, status, system_level); | 174 setup_path, options_, status, system_level); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 } // namespace installer | 178 } // namespace installer |
OLD | NEW |