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

Side by Side Diff: extensions/common/features/feature_util.h

Issue 1543053002: Switch to standard integer types in extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-extensions-browser
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef EXTENSIONS_COMMON_FEATURES_FEATURE_UTIL_H_ 5 #ifndef EXTENSIONS_COMMON_FEATURES_FEATURE_UTIL_H_
6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_UTIL_H_ 6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_UTIL_H_
7 7
8 #include "base/debug/alias.h" 8 #include "base/debug/alias.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h"
10 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
11 12
12 // Writes |message| to the stack so that it shows up in the minidump, then 13 // Writes |message| to the stack so that it shows up in the minidump, then
13 // crashes the current process. 14 // crashes the current process.
14 // 15 //
15 // The prefix "e::" is used so that the crash can be quickly located. 16 // The prefix "e::" is used so that the crash can be quickly located.
16 // 17 //
17 // This is provided in feature_util because for some reason features are prone 18 // This is provided in feature_util because for some reason features are prone
18 // to mysterious crashes in named map lookups. For example see crbug.com/365192 19 // to mysterious crashes in named map lookups. For example see crbug.com/365192
19 // and crbug.com/461915. 20 // and crbug.com/461915.
20 #define CRASH_WITH_MINIDUMP(message) \ 21 #define CRASH_WITH_MINIDUMP(message) \
21 { \ 22 { \
22 std::string message_copy(message); \ 23 std::string message_copy(message); \
23 char minidump[BUFSIZ]; \ 24 char minidump[BUFSIZ]; \
24 base::debug::Alias(&minidump); \ 25 base::debug::Alias(&minidump); \
25 base::snprintf(minidump, arraysize(minidump), "e::%s:%d:\"%s\"", __FILE__, \ 26 base::snprintf(minidump, arraysize(minidump), "e::%s:%d:\"%s\"", __FILE__, \
26 __LINE__, message_copy.c_str()); \ 27 __LINE__, message_copy.c_str()); \
27 LOG(FATAL) << message_copy; \ 28 LOG(FATAL) << message_copy; \
28 } 29 }
29 30
30 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_UTIL_H_ 31 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_UTIL_H_
OLDNEW
« no previous file with comments | « extensions/common/features/feature_provider.cc ('k') | extensions/common/features/json_feature_provider_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698