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 FilePath Product::GetUserDataPath() const { | 65 void Product::GetUserDataPaths(std::vector<FilePath>* paths) const { |
66 return GetChromeUserDataPath(distribution_); | 66 GetChromeUserDataPaths(distribution_, paths); |
67 } | 67 } |
68 | 68 |
69 bool Product::LaunchChrome(const FilePath& application_path) const { | 69 bool Product::LaunchChrome(const 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 void Product::AppendRenameFlags(CommandLine* command_line) const { | 151 void Product::AppendRenameFlags(CommandLine* command_line) const { |
152 operations_->AppendRenameFlags(options_, command_line); | 152 operations_->AppendRenameFlags(options_, command_line); |
153 } | 153 } |
154 | 154 |
155 bool Product::SetChannelFlags(bool set, ChannelInfo* channel_info) const { | 155 bool Product::SetChannelFlags(bool set, ChannelInfo* channel_info) const { |
156 return operations_->SetChannelFlags(options_, set, channel_info); | 156 return operations_->SetChannelFlags(options_, set, channel_info); |
157 } | 157 } |
158 | 158 |
159 } // namespace installer | 159 } // namespace installer |
OLD | NEW |