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

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

Issue 821673004: replace COMPILE_ASSERT with static_assert in chrome/installer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/delete_tree_work_item.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) 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"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 MOD_CHROME_FRAME, 51 MOD_CHROME_FRAME,
52 MOD_APP_HOST_DEPRECATED, // TODO(huangs): Remove by M27. 52 MOD_APP_HOST_DEPRECATED, // TODO(huangs): Remove by M27.
53 MOD_APP_LAUNCHER, 53 MOD_APP_LAUNCHER,
54 MOD_READY_MODE, 54 MOD_READY_MODE,
55 SFX_MULTI_FAIL, 55 SFX_MULTI_FAIL,
56 SFX_MIGRATING, 56 SFX_MIGRATING,
57 SFX_FULL, 57 SFX_FULL,
58 NUM_MODIFIERS 58 NUM_MODIFIERS
59 }; 59 };
60 60
61 COMPILE_ASSERT(NUM_MODIFIERS == arraysize(kModifiers), 61 static_assert(NUM_MODIFIERS == arraysize(kModifiers),
62 kModifiers_disagrees_with_ModifierIndex_comma_they_must_match_bang); 62 "kModifiers should have NUM_MODIFIERS elements");
63 63
64 // Returns true if the modifier is found, in which case |position| holds the 64 // Returns true if the modifier is found, in which case |position| holds the
65 // location at which the modifier was found. The number of characters in the 65 // location at which the modifier was found. The number of characters in the
66 // modifier is returned in |length|, if non-NULL. 66 // modifier is returned in |length|, if non-NULL.
67 bool FindModifier(ModifierIndex index, 67 bool FindModifier(ModifierIndex index,
68 const std::wstring& ap_value, 68 const std::wstring& ap_value,
69 std::wstring::size_type* position, 69 std::wstring::size_type* position,
70 std::wstring::size_type* length) { 70 std::wstring::size_type* length) {
71 DCHECK(position != NULL); 71 DCHECK(position != NULL);
72 std::wstring::size_type mod_position = std::wstring::npos; 72 std::wstring::size_type mod_position = std::wstring::npos;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 for (int scan = 0; scan < NUM_MODIFIERS; ++scan) { 303 for (int scan = 0; scan < NUM_MODIFIERS; ++scan) {
304 ModifierIndex index = static_cast<ModifierIndex>(scan); 304 ModifierIndex index = static_cast<ModifierIndex>(scan);
305 modified = SetModifier(index, false, &value_) || modified; 305 modified = SetModifier(index, false, &value_) || modified;
306 } 306 }
307 307
308 return modified; 308 return modified;
309 } 309 }
310 310
311 } // namespace installer 311 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/delete_tree_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698