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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // and a set of modifiers. | 147 // and a set of modifiers. |
148 void FakeProductState::SetChannel(const wchar_t* base, int channel_modifiers) { | 148 void FakeProductState::SetChannel(const wchar_t* base, int channel_modifiers) { |
149 channel_.set_value(base); | 149 channel_.set_value(base); |
150 for (size_t i = 0; i < arraysize(kChannelMethods); ++i) { | 150 for (size_t i = 0; i < arraysize(kChannelMethods); ++i) { |
151 if ((channel_modifiers & kChannelMethods[i].modifier) != 0) | 151 if ((channel_modifiers & kChannelMethods[i].modifier) != 0) |
152 (channel_.*kChannelMethods[i].method)(true); | 152 (channel_.*kChannelMethods[i].method)(true); |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 void FakeProductState::SetVersion(const char* version) { | 156 void FakeProductState::SetVersion(const char* version) { |
157 version_.reset( | 157 version_.reset(version == NULL ? NULL : new Version(version)); |
158 version == NULL ? NULL : Version::GetVersionFromString(version)); | |
159 } | 158 } |
160 | 159 |
161 // Sets the uninstall command for this object. | 160 // Sets the uninstall command for this object. |
162 void FakeProductState::SetUninstallCommand(BrowserDistribution::Type dist_type, | 161 void FakeProductState::SetUninstallCommand(BrowserDistribution::Type dist_type, |
163 Level install_level, | 162 Level install_level, |
164 const char* version, | 163 const char* version, |
165 int channel_modifiers, | 164 int channel_modifiers, |
166 Vehicle vehicle) { | 165 Vehicle vehicle) { |
167 DCHECK(version); | 166 DCHECK(version); |
168 | 167 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 InstallationValidatorTest, | 486 InstallationValidatorTest, |
488 Values(InstallationValidator::NO_PRODUCTS, | 487 Values(InstallationValidator::NO_PRODUCTS, |
489 InstallationValidator::CHROME_SINGLE, | 488 InstallationValidator::CHROME_SINGLE, |
490 InstallationValidator::CHROME_MULTI, | 489 InstallationValidator::CHROME_MULTI, |
491 InstallationValidator::CHROME_FRAME_SINGLE, | 490 InstallationValidator::CHROME_FRAME_SINGLE, |
492 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_SINGLE, | 491 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_SINGLE, |
493 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_MULTI, | 492 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_MULTI, |
494 InstallationValidator::CHROME_FRAME_MULTI, | 493 InstallationValidator::CHROME_FRAME_MULTI, |
495 InstallationValidator::CHROME_FRAME_MULTI_CHROME_MULTI, | 494 InstallationValidator::CHROME_FRAME_MULTI_CHROME_MULTI, |
496 InstallationValidator::CHROME_FRAME_READY_MODE_CHROME_MULTI)); | 495 InstallationValidator::CHROME_FRAME_READY_MODE_CHROME_MULTI)); |
OLD | NEW |