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

Side by Side Diff: chrome/common/crash_keys.cc

Issue 812503003: replace COMPILE_ASSERT with static_assert in chrome/common/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/webstore/webstore_api_constants.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/common/crash_keys.h" 5 #include "chrome/common/crash_keys.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 30 matching lines...) Expand all
41 static const size_t kSingleChunkLength = 41 static const size_t kSingleChunkLength =
42 google_breakpad::SimpleStringDictionary::value_size - 1; 42 google_breakpad::SimpleStringDictionary::value_size - 1;
43 #elif defined(OS_WIN) 43 #elif defined(OS_WIN)
44 static const size_t kSingleChunkLength = 44 static const size_t kSingleChunkLength =
45 google_breakpad::CustomInfoEntry::kValueMaxLength - 1; 45 google_breakpad::CustomInfoEntry::kValueMaxLength - 1;
46 #else 46 #else
47 static const size_t kSingleChunkLength = 63; 47 static const size_t kSingleChunkLength = 63;
48 #endif 48 #endif
49 49
50 // Guarantees for crash key sizes. 50 // Guarantees for crash key sizes.
51 COMPILE_ASSERT(kSmallSize <= kSingleChunkLength, 51 static_assert(kSmallSize <= kSingleChunkLength,
52 crash_key_chunk_size_too_small); 52 "crash key chunk size too small");
53 #if defined(OS_MACOSX) 53 #if defined(OS_MACOSX)
54 COMPILE_ASSERT(kMediumSize <= kSingleChunkLength, 54 static_assert(kMediumSize <= kSingleChunkLength,
55 mac_has_medium_size_crash_key_chunks); 55 "mac has medium size crash key chunks");
56 #endif 56 #endif
57 57
58 const char kClientId[] = "guid"; 58 const char kClientId[] = "guid";
59 59
60 const char kChannel[] = "channel"; 60 const char kChannel[] = "channel";
61 61
62 const char kActiveURL[] = "url-chunk"; 62 const char kActiveURL[] = "url-chunk";
63 63
64 const char kFontKeyName[] = "font_key_name"; 64 const char kFontKeyName[] = "font_key_name";
65 65
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 396 }
397 397
398 ScopedPrinterInfo::~ScopedPrinterInfo() { 398 ScopedPrinterInfo::~ScopedPrinterInfo() {
399 for (size_t i = 0; i < kPrinterInfoCount; ++i) { 399 for (size_t i = 0; i < kPrinterInfoCount; ++i) {
400 std::string key = base::StringPrintf(kPrinterInfo, i + 1); 400 std::string key = base::StringPrintf(kPrinterInfo, i + 1);
401 base::debug::ClearCrashKey(key); 401 base::debug::ClearCrashKey(key);
402 } 402 }
403 } 403 }
404 404
405 } // namespace crash_keys 405 } // namespace crash_keys
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/webstore/webstore_api_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698