| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CHILD_PROCESS_LOGGING_H_ | 5 #ifndef CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ |
| 6 #define CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ | 6 #define CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/mac/crash_logging.h" |
| 13 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 14 | 15 |
| 15 struct GPUInfo; | 16 struct GPUInfo; |
| 16 | 17 |
| 17 #if defined(OS_WIN) || defined(OS_MACOSX) | 18 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 18 // The maximum number of active extensions we will report. | 19 // The maximum number of active extensions we will report. |
| 19 // Also used in chrome/app, but we define it here to avoid a common->app | 20 // Also used in chrome/app, but we define it here to avoid a common->app |
| 20 // dependency. | 21 // dependency. |
| 21 static const int kMaxReportedActiveExtensions = 10; | 22 static const int kMaxReportedActiveExtensions = 10; |
| 22 #endif | 23 #endif |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 ~ScopedActiveURLSetter() { | 72 ~ScopedActiveURLSetter() { |
| 72 SetActiveURL(GURL()); | 73 SetActiveURL(GURL()); |
| 73 } | 74 } |
| 74 | 75 |
| 75 private: | 76 private: |
| 76 DISALLOW_COPY_AND_ASSIGN(ScopedActiveURLSetter); | 77 DISALLOW_COPY_AND_ASSIGN(ScopedActiveURLSetter); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace child_process_logging | 80 } // namespace child_process_logging |
| 80 | 81 |
| 81 #if defined(OS_MACOSX) && __OBJC__ | 82 #if defined(OS_MACOSX) |
| 82 | |
| 83 @class NSString; | |
| 84 | |
| 85 typedef void (*SetCrashKeyValueFuncPtr)(NSString*, NSString*); | |
| 86 typedef void (*ClearCrashKeyValueFuncPtr)(NSString*); | |
| 87 | 83 |
| 88 namespace child_process_logging { | 84 namespace child_process_logging { |
| 89 void SetCrashKeyFunctions(SetCrashKeyValueFuncPtr set_key_func, | 85 |
| 90 ClearCrashKeyValueFuncPtr clear_key_func); | |
| 91 void SetActiveURLImpl(const GURL& url, | 86 void SetActiveURLImpl(const GURL& url, |
| 92 SetCrashKeyValueFuncPtr set_key_func, | 87 base::mac::SetCrashKeyValueFuncPtr set_key_func, |
| 93 ClearCrashKeyValueFuncPtr clear_key_func); | 88 base::mac::ClearCrashKeyValueFuncPtr clear_key_func); |
| 94 | 89 |
| 95 extern const int kMaxNumCrashURLChunks; | 90 extern const int kMaxNumCrashURLChunks; |
| 96 extern const int kMaxNumURLChunkValueLength; | 91 extern const int kMaxNumURLChunkValueLength; |
| 97 extern const char *kUrlChunkFormatStr; | 92 extern const char *kUrlChunkFormatStr; |
| 93 |
| 98 } // namespace child_process_logging | 94 } // namespace child_process_logging |
| 99 | 95 |
| 100 #endif // defined(OS_MACOSX) && __OBJC__ | 96 #endif // defined(OS_MACOSX) |
| 101 | 97 |
| 102 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ | 98 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ |
| OLD | NEW |