| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/channel_info.h" | 5 #include "chrome/installer/util/channel_info.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/win/registry.h" | 8 #include "base/win/registry.h" |
| 9 #include "chrome/installer/util/google_update_constants.h" | 9 #include "chrome/installer/util/google_update_constants.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 const wchar_t* const kModifiers[] = { | 26 const wchar_t* const kModifiers[] = { |
| 27 kModCeee, | 27 kModCeee, |
| 28 kModFullInstall, | 28 kModFullInstall, |
| 29 kModMultiInstall | 29 kModMultiInstall |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace | 32 } // namespace |
| 33 | 33 |
| 34 namespace installer { | 34 namespace installer_util { |
| 35 | 35 |
| 36 // static | 36 // static |
| 37 bool ChannelInfo::HasModifier(const wchar_t* modifier, | 37 bool ChannelInfo::HasModifier(const wchar_t* modifier, |
| 38 const std::wstring& ap_value) { | 38 const std::wstring& ap_value) { |
| 39 DCHECK(modifier); | 39 DCHECK(modifier); |
| 40 return ap_value.find(modifier) != std::wstring::npos; | 40 return ap_value.find(modifier) != std::wstring::npos; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Returns true if |ap_value| is modified. | 43 // Returns true if |ap_value| is modified. |
| 44 // static | 44 // static |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 | 119 |
| 120 bool ChannelInfo::IsMultiInstall() const { | 120 bool ChannelInfo::IsMultiInstall() const { |
| 121 return HasModifier(kModMultiInstall, value_); | 121 return HasModifier(kModMultiInstall, value_); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool ChannelInfo::SetMultiInstall(bool value) { | 124 bool ChannelInfo::SetMultiInstall(bool value) { |
| 125 return SetModifier(kModMultiInstall, value, &value_); | 125 return SetModifier(kModMultiInstall, value, &value_); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace installer | 128 } // namespace installer_util |
| OLD | NEW |