OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 56 |
57 FilePath Product::GetUserDataPath() const { | 57 FilePath Product::GetUserDataPath() const { |
58 return GetChromeUserDataPath(distribution_); | 58 return GetChromeUserDataPath(distribution_); |
59 } | 59 } |
60 | 60 |
61 bool Product::LaunchChrome(const FilePath& application_path) const { | 61 bool Product::LaunchChrome(const FilePath& application_path) const { |
62 bool success = !application_path.empty(); | 62 bool success = !application_path.empty(); |
63 if (success) { | 63 if (success) { |
64 CommandLine cmd(application_path.Append(installer::kChromeExe)); | 64 CommandLine cmd(application_path.Append(installer::kChromeExe)); |
65 base::LaunchOptions options; | 65 success = base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
66 success = base::LaunchProcess(cmd, options); | |
67 } | 66 } |
68 return success; | 67 return success; |
69 } | 68 } |
70 | 69 |
71 bool Product::LaunchChromeAndWait(const FilePath& application_path, | 70 bool Product::LaunchChromeAndWait(const FilePath& application_path, |
72 const CommandLine& options, | 71 const CommandLine& options, |
73 int32* exit_code) const { | 72 int32* exit_code) const { |
74 if (application_path.empty()) | 73 if (application_path.empty()) |
75 return false; | 74 return false; |
76 | 75 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 143 |
145 void Product::AppendRenameFlags(CommandLine* command_line) const { | 144 void Product::AppendRenameFlags(CommandLine* command_line) const { |
146 operations_->AppendRenameFlags(options_, command_line); | 145 operations_->AppendRenameFlags(options_, command_line); |
147 } | 146 } |
148 | 147 |
149 bool Product::SetChannelFlags(bool set, ChannelInfo* channel_info) const { | 148 bool Product::SetChannelFlags(bool set, ChannelInfo* channel_info) const { |
150 return operations_->SetChannelFlags(options_, set, channel_info); | 149 return operations_->SetChannelFlags(options_, set, channel_info); |
151 } | 150 } |
152 | 151 |
153 } // namespace installer | 152 } // namespace installer |
OLD | NEW |