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