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

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

Issue 8909009: Remove remaining references to CEEE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync'ed, no new changes Created 9 years 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) 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 "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
11 using base::win::RegKey; 11 using base::win::RegKey;
12 12
13 namespace { 13 namespace {
14 14
15 const wchar_t kChannelBeta[] = L"beta"; 15 const wchar_t kChannelBeta[] = L"beta";
16 const wchar_t kChannelDev[] = L"dev"; 16 const wchar_t kChannelDev[] = L"dev";
17 const wchar_t kModCeee[] = L"-CEEE";
18 const wchar_t kModChrome[] = L"-chrome"; 17 const wchar_t kModChrome[] = L"-chrome";
19 const wchar_t kModChromeFrame[] = L"-chromeframe"; 18 const wchar_t kModChromeFrame[] = L"-chromeframe";
20 const wchar_t kModMultiInstall[] = L"-multi"; 19 const wchar_t kModMultiInstall[] = L"-multi";
21 const wchar_t kModReadyMode[] = L"-readymode"; 20 const wchar_t kModReadyMode[] = L"-readymode";
22 const wchar_t kModStage[] = L"-stage:"; 21 const wchar_t kModStage[] = L"-stage:";
23 const wchar_t kSfxFull[] = L"-full"; 22 const wchar_t kSfxFull[] = L"-full";
24 const wchar_t kSfxMultiFail[] = L"-multifail"; 23 const wchar_t kSfxMultiFail[] = L"-multifail";
25 24
26 const wchar_t* const kChannels[] = { 25 const wchar_t* const kChannels[] = {
27 kChannelBeta, 26 kChannelBeta,
28 kChannelDev 27 kChannelDev
29 }; 28 };
30 29
31 const wchar_t* const kModifiers[] = { 30 const wchar_t* const kModifiers[] = {
32 kModStage, 31 kModStage,
33 kModMultiInstall, 32 kModMultiInstall,
34 kModChrome, 33 kModChrome,
35 kModChromeFrame, 34 kModChromeFrame,
36 kModCeee,
37 kModReadyMode, 35 kModReadyMode,
38 kSfxMultiFail, 36 kSfxMultiFail,
39 kSfxFull 37 kSfxFull
40 }; 38 };
41 39
42 enum ModifierIndex { 40 enum ModifierIndex {
43 MOD_STAGE, 41 MOD_STAGE,
44 MOD_MULTI_INSTALL, 42 MOD_MULTI_INSTALL,
45 MOD_CHROME, 43 MOD_CHROME,
46 MOD_CHROME_FRAME, 44 MOD_CHROME_FRAME,
47 MOD_CEEE,
48 MOD_READY_MODE, 45 MOD_READY_MODE,
49 SFX_MULTI_FAIL, 46 SFX_MULTI_FAIL,
50 SFX_FULL, 47 SFX_FULL,
51 NUM_MODIFIERS 48 NUM_MODIFIERS
52 }; 49 };
53 50
54 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers), 51 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers),
55 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang); 52 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang);
56 53
57 // Returns true if the modifier is found, in which case |position| holds the 54 // Returns true if the modifier is found, in which case |position| holds the
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 171 }
175 if (tmp_value.empty()) { 172 if (tmp_value.empty()) {
176 channel_name->erase(); 173 channel_name->erase();
177 return true; 174 return true;
178 } 175 }
179 } 176 }
180 177
181 return false; 178 return false;
182 } 179 }
183 180
184 bool ChannelInfo::IsCeee() const {
185 return HasModifier(MOD_CEEE, value_);
186 }
187
188 bool ChannelInfo::SetCeee(bool value) {
189 return SetModifier(MOD_CEEE, value, &value_);
190 }
191
192 bool ChannelInfo::IsChrome() const { 181 bool ChannelInfo::IsChrome() const {
193 return HasModifier(MOD_CHROME, value_); 182 return HasModifier(MOD_CHROME, value_);
194 } 183 }
195 184
196 bool ChannelInfo::SetChrome(bool value) { 185 bool ChannelInfo::SetChrome(bool value) {
197 return SetModifier(MOD_CHROME, value, &value_); 186 return SetModifier(MOD_CHROME, value, &value_);
198 } 187 }
199 188
200 bool ChannelInfo::IsChromeFrame() const { 189 bool ChannelInfo::IsChromeFrame() const {
201 return HasModifier(MOD_CHROME_FRAME, value_); 190 return HasModifier(MOD_CHROME_FRAME, value_);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 258
270 bool ChannelInfo::HasMultiFailSuffix() const { 259 bool ChannelInfo::HasMultiFailSuffix() const {
271 return HasModifier(SFX_MULTI_FAIL, value_); 260 return HasModifier(SFX_MULTI_FAIL, value_);
272 } 261 }
273 262
274 bool ChannelInfo::SetMultiFailSuffix(bool value) { 263 bool ChannelInfo::SetMultiFailSuffix(bool value) {
275 return SetModifier(SFX_MULTI_FAIL, value, &value_); 264 return SetModifier(SFX_MULTI_FAIL, value, &value_);
276 } 265 }
277 266
278 } // namespace installer 267 } // 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