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

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

Issue 10818021: Revert 147650 - Implement installation of the Chrome App Host. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1215/src/
Patch Set: Created 8 years, 5 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
OLDNEW
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 "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 #include "chrome/installer/util/util_constants.h" 10 #include "chrome/installer/util/util_constants.h"
11 11
12 using base::win::RegKey; 12 using base::win::RegKey;
13 13
14 namespace { 14 namespace {
15 15
16 const wchar_t kModChrome[] = L"-chrome"; 16 const wchar_t kModChrome[] = L"-chrome";
17 const wchar_t kModChromeFrame[] = L"-chromeframe"; 17 const wchar_t kModChromeFrame[] = L"-chromeframe";
18 const wchar_t kModAppHost[] = L"-apphost";
19 const wchar_t kModMultiInstall[] = L"-multi"; 18 const wchar_t kModMultiInstall[] = L"-multi";
20 const wchar_t kModReadyMode[] = L"-readymode"; 19 const wchar_t kModReadyMode[] = L"-readymode";
21 const wchar_t kModStage[] = L"-stage:"; 20 const wchar_t kModStage[] = L"-stage:";
22 const wchar_t kSfxFull[] = L"-full"; 21 const wchar_t kSfxFull[] = L"-full";
23 const wchar_t kSfxMultiFail[] = L"-multifail"; 22 const wchar_t kSfxMultiFail[] = L"-multifail";
24 23
25 const wchar_t* const kChannels[] = { 24 const wchar_t* const kChannels[] = {
26 installer::kChromeChannelBeta, 25 installer::kChromeChannelBeta,
27 installer::kChromeChannelDev 26 installer::kChromeChannelDev
28 }; 27 };
29 28
30 const wchar_t* const kModifiers[] = { 29 const wchar_t* const kModifiers[] = {
31 kModStage, 30 kModStage,
32 kModMultiInstall, 31 kModMultiInstall,
33 kModChrome, 32 kModChrome,
34 kModChromeFrame, 33 kModChromeFrame,
35 kModAppHost,
36 kModReadyMode, 34 kModReadyMode,
37 kSfxMultiFail, 35 kSfxMultiFail,
38 kSfxFull 36 kSfxFull
39 }; 37 };
40 38
41 enum ModifierIndex { 39 enum ModifierIndex {
42 MOD_STAGE, 40 MOD_STAGE,
43 MOD_MULTI_INSTALL, 41 MOD_MULTI_INSTALL,
44 MOD_CHROME, 42 MOD_CHROME,
45 MOD_CHROME_FRAME, 43 MOD_CHROME_FRAME,
46 MOD_APP_HOST,
47 MOD_READY_MODE, 44 MOD_READY_MODE,
48 SFX_MULTI_FAIL, 45 SFX_MULTI_FAIL,
49 SFX_FULL, 46 SFX_FULL,
50 NUM_MODIFIERS 47 NUM_MODIFIERS
51 }; 48 };
52 49
53 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers), 50 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers),
54 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang); 51 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang);
55 52
56 // Returns true if the modifier is found, in which case |position| holds the 53 // Returns true if the modifier is found, in which case |position| holds the
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 186 }
190 187
191 bool ChannelInfo::IsChromeFrame() const { 188 bool ChannelInfo::IsChromeFrame() const {
192 return HasModifier(MOD_CHROME_FRAME, value_); 189 return HasModifier(MOD_CHROME_FRAME, value_);
193 } 190 }
194 191
195 bool ChannelInfo::SetChromeFrame(bool value) { 192 bool ChannelInfo::SetChromeFrame(bool value) {
196 return SetModifier(MOD_CHROME_FRAME, value, &value_); 193 return SetModifier(MOD_CHROME_FRAME, value, &value_);
197 } 194 }
198 195
199 bool ChannelInfo::IsAppHost() const {
200 return HasModifier(MOD_APP_HOST, value_);
201 }
202
203 bool ChannelInfo::SetAppHost(bool value) {
204 return SetModifier(MOD_APP_HOST, value, &value_);
205 }
206
207 bool ChannelInfo::IsMultiInstall() const { 196 bool ChannelInfo::IsMultiInstall() const {
208 return HasModifier(MOD_MULTI_INSTALL, value_); 197 return HasModifier(MOD_MULTI_INSTALL, value_);
209 } 198 }
210 199
211 bool ChannelInfo::SetMultiInstall(bool value) { 200 bool ChannelInfo::SetMultiInstall(bool value) {
212 return SetModifier(MOD_MULTI_INSTALL, value, &value_); 201 return SetModifier(MOD_MULTI_INSTALL, value, &value_);
213 } 202 }
214 203
215 bool ChannelInfo::IsReadyMode() const { 204 bool ChannelInfo::IsReadyMode() const {
216 return HasModifier(MOD_READY_MODE, value_); 205 return HasModifier(MOD_READY_MODE, value_);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 257
269 bool ChannelInfo::HasMultiFailSuffix() const { 258 bool ChannelInfo::HasMultiFailSuffix() const {
270 return HasModifier(SFX_MULTI_FAIL, value_); 259 return HasModifier(SFX_MULTI_FAIL, value_);
271 } 260 }
272 261
273 bool ChannelInfo::SetMultiFailSuffix(bool value) { 262 bool ChannelInfo::SetMultiFailSuffix(bool value) {
274 return SetModifier(SFX_MULTI_FAIL, value, &value_); 263 return SetModifier(SFX_MULTI_FAIL, value, &value_);
275 } 264 }
276 265
277 } // namespace installer 266 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/channel_info.h ('k') | chrome/installer/util/chrome_app_host_distribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698