Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: chrome/installer/util/channel_info.cc

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/channel_info.h ('k') | chrome/installer/util/channel_info_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 if (tmp_value.empty()) { 147 if (tmp_value.empty()) {
148 channel_name->erase(); 148 channel_name->erase();
149 return true; 149 return true;
150 } 150 }
151 } 151 }
152 152
153 return false; 153 return false;
154 } 154 }
155 155
156 bool ChannelInfo::EqualsBaseOf(const ChannelInfo& other) const {
157 std::wstring::size_type this_base_end;
158 std::wstring::size_type other_base_end;
159
160 if (!FindModifier(MOD_MULTI_INSTALL, value_, &this_base_end))
161 this_base_end = FindInsertionPoint(MOD_MULTI_INSTALL, value_);
162 if (!FindModifier(MOD_MULTI_INSTALL, other.value_, &other_base_end))
163 other_base_end = FindInsertionPoint(MOD_MULTI_INSTALL, other.value_);
164 return value_.compare(0, this_base_end,
165 other.value_.c_str(), other_base_end) == 0;
166 }
167
156 bool ChannelInfo::IsCeee() const { 168 bool ChannelInfo::IsCeee() const {
157 return HasModifier(MOD_CEEE, value_); 169 return HasModifier(MOD_CEEE, value_);
158 } 170 }
159 171
160 bool ChannelInfo::SetCeee(bool value) { 172 bool ChannelInfo::SetCeee(bool value) {
161 return SetModifier(MOD_CEEE, value, &value_); 173 return SetModifier(MOD_CEEE, value, &value_);
162 } 174 }
163 175
164 bool ChannelInfo::IsChrome() const { 176 bool ChannelInfo::IsChrome() const {
165 return HasModifier(MOD_CHROME, value_); 177 return HasModifier(MOD_CHROME, value_);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 215
204 bool ChannelInfo::HasMultiFailSuffix() const { 216 bool ChannelInfo::HasMultiFailSuffix() const {
205 return HasModifier(SFX_MULTI_FAIL, value_); 217 return HasModifier(SFX_MULTI_FAIL, value_);
206 } 218 }
207 219
208 bool ChannelInfo::SetMultiFailSuffix(bool value) { 220 bool ChannelInfo::SetMultiFailSuffix(bool value) {
209 return SetModifier(SFX_MULTI_FAIL, value, &value_); 221 return SetModifier(SFX_MULTI_FAIL, value, &value_);
210 } 222 }
211 223
212 } // namespace installer 224 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/channel_info.h ('k') | chrome/installer/util/channel_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698