| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // and a set of modifiers. | 163 // and a set of modifiers. |
| 164 void FakeProductState::SetChannel(const wchar_t* base, int channel_modifiers) { | 164 void FakeProductState::SetChannel(const wchar_t* base, int channel_modifiers) { |
| 165 channel_.set_value(base); | 165 channel_.set_value(base); |
| 166 for (size_t i = 0; i < arraysize(kChannelMethods); ++i) { | 166 for (size_t i = 0; i < arraysize(kChannelMethods); ++i) { |
| 167 if ((channel_modifiers & kChannelMethods[i].modifier) != 0) | 167 if ((channel_modifiers & kChannelMethods[i].modifier) != 0) |
| 168 (channel_.*kChannelMethods[i].method)(true); | 168 (channel_.*kChannelMethods[i].method)(true); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 void FakeProductState::SetVersion(const char* version) { | 172 void FakeProductState::SetVersion(const char* version) { |
| 173 version_.reset(version == NULL ? NULL : new Version(version)); | 173 version_.reset(version == NULL ? NULL : new base::Version(version)); |
| 174 } | 174 } |
| 175 | 175 |
| 176 // Sets the uninstall command for this object. | 176 // Sets the uninstall command for this object. |
| 177 void FakeProductState::SetUninstallCommand(BrowserDistribution::Type dist_type, | 177 void FakeProductState::SetUninstallCommand(BrowserDistribution::Type dist_type, |
| 178 Level install_level, | 178 Level install_level, |
| 179 const char* version, | 179 const char* version, |
| 180 int channel_modifiers, | 180 int channel_modifiers, |
| 181 Vehicle vehicle) { | 181 Vehicle vehicle) { |
| 182 DCHECK(version); | 182 DCHECK(version); |
| 183 | 183 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 AllValidInstallations, | 482 AllValidInstallations, |
| 483 InstallationValidatorTest, | 483 InstallationValidatorTest, |
| 484 Values(InstallationValidator::NO_PRODUCTS, | 484 Values(InstallationValidator::NO_PRODUCTS, |
| 485 InstallationValidator::CHROME_SINGLE, | 485 InstallationValidator::CHROME_SINGLE, |
| 486 InstallationValidator::CHROME_MULTI, | 486 InstallationValidator::CHROME_MULTI, |
| 487 InstallationValidator::CHROME_FRAME_SINGLE, | 487 InstallationValidator::CHROME_FRAME_SINGLE, |
| 488 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_SINGLE, | 488 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_SINGLE, |
| 489 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_MULTI, | 489 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_MULTI, |
| 490 InstallationValidator::CHROME_FRAME_MULTI, | 490 InstallationValidator::CHROME_FRAME_MULTI, |
| 491 InstallationValidator::CHROME_FRAME_MULTI_CHROME_MULTI)); | 491 InstallationValidator::CHROME_FRAME_MULTI_CHROME_MULTI)); |
| OLD | NEW |