| 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 |
| 27 // Crash Key Name Constants //////////////////////////////////////////////////// | 38 // Crash Key Name Constants //////////////////////////////////////////////////// |
| 28 | 39 |
| 29 // The product release/distribution channel. | 40 // The product release/distribution channel. |
| 30 extern const char kChannel[]; | 41 extern const char kChannel[]; |
| 31 | 42 |
| 32 // The URL of the active tab. | 43 // The URL of the active tab. |
| 33 extern const char kActiveURL[]; | 44 extern const char kActiveURL[]; |
| 34 | 45 |
| 35 // Installed extensions. |kExtensionID| should be formatted with an integer, | 46 // Installed extensions. |kExtensionID| should be formatted with an integer, |
| 36 // in the range [0, kExtensionIDMaxCount). | 47 // in the range [0, kExtensionIDMaxCount). |
| (...skipping 15 matching lines...) Expand all Loading... |
| 52 extern const char kGPUDriverVersion[]; | 63 extern const char kGPUDriverVersion[]; |
| 53 extern const char kGPUPixelShaderVersion[]; | 64 extern const char kGPUPixelShaderVersion[]; |
| 54 extern const char kGPUVertexShaderVersion[]; | 65 extern const char kGPUVertexShaderVersion[]; |
| 55 #if defined(OS_LINUX) | 66 #if defined(OS_LINUX) |
| 56 extern const char kGPUVendor[]; | 67 extern const char kGPUVendor[]; |
| 57 extern const char kGPURenderer[]; | 68 extern const char kGPURenderer[]; |
| 58 #elif defined(OS_MACOSX) | 69 #elif defined(OS_MACOSX) |
| 59 extern const char kGPUGLVersion[]; | 70 extern const char kGPUGLVersion[]; |
| 60 #endif | 71 #endif |
| 61 | 72 |
| 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 |
| 62 #if defined(OS_MACOSX) | 78 #if defined(OS_MACOSX) |
| 63 namespace mac { | 79 namespace mac { |
| 64 | 80 |
| 65 // Used to report the first Cocoa/Mac NSException and its backtrace. | 81 // Used to report the first Cocoa/Mac NSException and its backtrace. |
| 66 extern const char kFirstNSException[]; | 82 extern const char kFirstNSException[]; |
| 67 extern const char kFirstNSExceptionTrace[]; | 83 extern const char kFirstNSExceptionTrace[]; |
| 68 | 84 |
| 69 // Used to report the last Cocoa/Mac NSException and its backtrace. | 85 // Used to report the last Cocoa/Mac NSException and its backtrace. |
| 70 extern const char kLastNSException[]; | 86 extern const char kLastNSException[]; |
| 71 extern const char kLastNSExceptionTrace[]; | 87 extern const char kLastNSExceptionTrace[]; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 85 | 101 |
| 86 // Backtrace of a Thread's dtor for <http://crbug.com/274705>. | 102 // Backtrace of a Thread's dtor for <http://crbug.com/274705>. |
| 87 extern const char kPasswordThreadDtorTrace[]; | 103 extern const char kPasswordThreadDtorTrace[]; |
| 88 | 104 |
| 89 } // namespace mac | 105 } // namespace mac |
| 90 #endif | 106 #endif |
| 91 | 107 |
| 92 } // namespace crash_keys | 108 } // namespace crash_keys |
| 93 | 109 |
| 94 #endif // CHROME_COMMON_CRASH_KEYS_H_ | 110 #endif // CHROME_COMMON_CRASH_KEYS_H_ |
| OLD | NEW |