| OLD | NEW |
| 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 #ifndef CHROME_COMMON_CRASH_KEYS_H_ | 5 #ifndef CHROME_COMMON_CRASH_KEYS_H_ |
| 6 #define CHROME_COMMON_CRASH_KEYS_H_ | 6 #define CHROME_COMMON_CRASH_KEYS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/debug/crash_logging.h" | 11 #include "base/debug/crash_logging.h" |
| 12 | 12 |
| 13 namespace crash_keys { | 13 namespace crash_keys { |
| 14 | 14 |
| 15 // Registers all of the potential crash keys that can be sent to the crash | 15 // Registers all of the potential crash keys that can be sent to the crash |
| 16 // reporting server. Returns the size of the union of all keys. | 16 // reporting server. Returns the size of the union of all keys. |
| 17 size_t RegisterChromeCrashKeys(); | 17 size_t RegisterChromeCrashKeys(); |
| 18 | 18 |
| 19 // Sets the list of "active" extensions in this process. We overload "active" to | 19 // Sets the list of "active" extensions in this process. We overload "active" to |
| 20 // mean different things depending on the process type: | 20 // mean different things depending on the process type: |
| 21 // - browser: all enabled extensions | 21 // - browser: all enabled extensions |
| 22 // - renderer: the unique set of extension ids from all content scripts | 22 // - renderer: the unique set of extension ids from all content scripts |
| 23 // - extension: the id of each extension running in this process (there can be | 23 // - extension: the id of each extension running in this process (there can be |
| 24 // multiple because of process collapsing). | 24 // multiple because of process collapsing). |
| 25 void SetActiveExtensions(const std::set<std::string>& extensions); | 25 void SetActiveExtensions(const std::set<std::string>& extensions); |
| 26 | 26 |
| 27 // Sets the printer info. Data should be separated by ';' up to | |
| 28 // kPrinterInfoCount substrings. Each substring will be truncated if necessary. | |
| 29 class ScopedPrinterInfo { | |
| 30 public: | |
| 31 explicit ScopedPrinterInfo(const base::StringPiece& data); | |
| 32 ~ScopedPrinterInfo(); | |
| 33 | |
| 34 private: | |
| 35 DISALLOW_COPY_AND_ASSIGN(ScopedPrinterInfo); | |
| 36 }; | |
| 37 | |
| 38 // Crash Key Name Constants //////////////////////////////////////////////////// | 27 // Crash Key Name Constants //////////////////////////////////////////////////// |
| 39 | 28 |
| 40 // The product release/distribution channel. | 29 // The product release/distribution channel. |
| 41 extern const char kChannel[]; | 30 extern const char kChannel[]; |
| 42 | 31 |
| 43 // The URL of the active tab. | 32 // The URL of the active tab. |
| 44 extern const char kActiveURL[]; | 33 extern const char kActiveURL[]; |
| 45 | 34 |
| 46 // Installed extensions. |kExtensionID| should be formatted with an integer, | 35 // Installed extensions. |kExtensionID| should be formatted with an integer, |
| 47 // in the range [0, kExtensionIDMaxCount). | 36 // in the range [0, kExtensionIDMaxCount). |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 extern const char kGPUDriverVersion[]; | 52 extern const char kGPUDriverVersion[]; |
| 64 extern const char kGPUPixelShaderVersion[]; | 53 extern const char kGPUPixelShaderVersion[]; |
| 65 extern const char kGPUVertexShaderVersion[]; | 54 extern const char kGPUVertexShaderVersion[]; |
| 66 #if defined(OS_LINUX) | 55 #if defined(OS_LINUX) |
| 67 extern const char kGPUVendor[]; | 56 extern const char kGPUVendor[]; |
| 68 extern const char kGPURenderer[]; | 57 extern const char kGPURenderer[]; |
| 69 #elif defined(OS_MACOSX) | 58 #elif defined(OS_MACOSX) |
| 70 extern const char kGPUGLVersion[]; | 59 extern const char kGPUGLVersion[]; |
| 71 #endif | 60 #endif |
| 72 | 61 |
| 73 // The user's printers, up to kPrinterInfoCount. Should be set with | |
| 74 // ScopedPrinterInfo. | |
| 75 const size_t kPrinterInfoCount = 4; | |
| 76 extern const char kPrinterInfo[]; | |
| 77 | |
| 78 #if defined(OS_MACOSX) | 62 #if defined(OS_MACOSX) |
| 79 namespace mac { | 63 namespace mac { |
| 80 | 64 |
| 81 // Used to report the first Cocoa/Mac NSException and its backtrace. | 65 // Used to report the first Cocoa/Mac NSException and its backtrace. |
| 82 extern const char kFirstNSException[]; | 66 extern const char kFirstNSException[]; |
| 83 extern const char kFirstNSExceptionTrace[]; | 67 extern const char kFirstNSExceptionTrace[]; |
| 84 | 68 |
| 85 // Used to report the last Cocoa/Mac NSException and its backtrace. | 69 // Used to report the last Cocoa/Mac NSException and its backtrace. |
| 86 extern const char kLastNSException[]; | 70 extern const char kLastNSException[]; |
| 87 extern const char kLastNSExceptionTrace[]; | 71 extern const char kLastNSExceptionTrace[]; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 101 | 85 |
| 102 // Backtrace of a Thread's dtor for <http://crbug.com/274705>. | 86 // Backtrace of a Thread's dtor for <http://crbug.com/274705>. |
| 103 extern const char kPasswordThreadDtorTrace[]; | 87 extern const char kPasswordThreadDtorTrace[]; |
| 104 | 88 |
| 105 } // namespace mac | 89 } // namespace mac |
| 106 #endif | 90 #endif |
| 107 | 91 |
| 108 } // namespace crash_keys | 92 } // namespace crash_keys |
| 109 | 93 |
| 110 #endif // CHROME_COMMON_CRASH_KEYS_H_ | 94 #endif // CHROME_COMMON_CRASH_KEYS_H_ |
| OLD | NEW |