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

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

Issue 10790144: Revert 148046 - 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, 4 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";
18 const wchar_t kModMultiInstall[] = L"-multi"; 19 const wchar_t kModMultiInstall[] = L"-multi";
19 const wchar_t kModReadyMode[] = L"-readymode"; 20 const wchar_t kModReadyMode[] = L"-readymode";
20 const wchar_t kModStage[] = L"-stage:"; 21 const wchar_t kModStage[] = L"-stage:";
21 const wchar_t kSfxFull[] = L"-full"; 22 const wchar_t kSfxFull[] = L"-full";
22 const wchar_t kSfxMultiFail[] = L"-multifail"; 23 const wchar_t kSfxMultiFail[] = L"-multifail";
23 24
24 const wchar_t* const kChannels[] = { 25 const wchar_t* const kChannels[] = {
25 installer::kChromeChannelBeta, 26 installer::kChromeChannelBeta,
26 installer::kChromeChannelDev 27 installer::kChromeChannelDev
27 }; 28 };
28 29
29 const wchar_t* const kModifiers[] = { 30 const wchar_t* const kModifiers[] = {
30 kModStage, 31 kModStage,
31 kModMultiInstall, 32 kModMultiInstall,
32 kModChrome, 33 kModChrome,
33 kModChromeFrame, 34 kModChromeFrame,
35 kModAppHost,
34 kModReadyMode, 36 kModReadyMode,
35 kSfxMultiFail, 37 kSfxMultiFail,
36 kSfxFull 38 kSfxFull
37 }; 39 };
38 40
39 enum ModifierIndex { 41 enum ModifierIndex {
40 MOD_STAGE, 42 MOD_STAGE,
41 MOD_MULTI_INSTALL, 43 MOD_MULTI_INSTALL,
42 MOD_CHROME, 44 MOD_CHROME,
43 MOD_CHROME_FRAME, 45 MOD_CHROME_FRAME,
46 MOD_APP_HOST,
44 MOD_READY_MODE, 47 MOD_READY_MODE,
45 SFX_MULTI_FAIL, 48 SFX_MULTI_FAIL,
46 SFX_FULL, 49 SFX_FULL,
47 NUM_MODIFIERS 50 NUM_MODIFIERS
48 }; 51 };
49 52
50 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers), 53 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers),
51 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang); 54 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang);
52 55
53 // Returns true if the modifier is found, in which case |position| holds the 56 // 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
186 } 189 }
187 190
188 bool ChannelInfo::IsChromeFrame() const { 191 bool ChannelInfo::IsChromeFrame() const {
189 return HasModifier(MOD_CHROME_FRAME, value_); 192 return HasModifier(MOD_CHROME_FRAME, value_);
190 } 193 }
191 194
192 bool ChannelInfo::SetChromeFrame(bool value) { 195 bool ChannelInfo::SetChromeFrame(bool value) {
193 return SetModifier(MOD_CHROME_FRAME, value, &value_); 196 return SetModifier(MOD_CHROME_FRAME, value, &value_);
194 } 197 }
195 198
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
196 bool ChannelInfo::IsMultiInstall() const { 207 bool ChannelInfo::IsMultiInstall() const {
197 return HasModifier(MOD_MULTI_INSTALL, value_); 208 return HasModifier(MOD_MULTI_INSTALL, value_);
198 } 209 }
199 210
200 bool ChannelInfo::SetMultiInstall(bool value) { 211 bool ChannelInfo::SetMultiInstall(bool value) {
201 return SetModifier(MOD_MULTI_INSTALL, value, &value_); 212 return SetModifier(MOD_MULTI_INSTALL, value, &value_);
202 } 213 }
203 214
204 bool ChannelInfo::IsReadyMode() const { 215 bool ChannelInfo::IsReadyMode() const {
205 return HasModifier(MOD_READY_MODE, value_); 216 return HasModifier(MOD_READY_MODE, value_);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 268
258 bool ChannelInfo::HasMultiFailSuffix() const { 269 bool ChannelInfo::HasMultiFailSuffix() const {
259 return HasModifier(SFX_MULTI_FAIL, value_); 270 return HasModifier(SFX_MULTI_FAIL, value_);
260 } 271 }
261 272
262 bool ChannelInfo::SetMultiFailSuffix(bool value) { 273 bool ChannelInfo::SetMultiFailSuffix(bool value) {
263 return SetModifier(SFX_MULTI_FAIL, value, &value_); 274 return SetModifier(SFX_MULTI_FAIL, value, &value_);
264 } 275 }
265 276
266 } // namespace installer 277 } // 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