| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 9 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 10 | 12 |
| 11 namespace child_process_logging { | 13 namespace child_process_logging { |
| 12 | 14 |
| 13 // Sets the URL that is logged if the child process crashes. Use GURL() to clear | 15 // Sets the URL that is logged if the child process crashes. Use GURL() to clear |
| 14 // the URL. | 16 // the URL. |
| 15 void SetActiveURL(const GURL& url); | 17 void SetActiveURL(const GURL& url); |
| 16 | 18 |
| 17 // Sets the Client ID that is used as GUID if a Chrome process crashes. | 19 // Sets the Client ID that is used as GUID if a Chrome process crashes. |
| 18 void SetClientId(const std::string& client_id); | 20 void SetClientId(const std::string& client_id); |
| 19 | 21 |
| 22 // Sets the list of "active" extensions in this process. We overload "active" to |
| 23 // mean different things depending on the process type: |
| 24 // - browser: all enabled extensions |
| 25 // - renderer: the unique set of extension ids from all content scripts |
| 26 // - extension: the id of each extension running in this process (there can be |
| 27 // multiple because of process collapsing). |
| 28 void SetActiveExtensions(const std::vector<std::string>& extension_ids); |
| 29 |
| 20 // Simple wrapper class that sets the active URL in it's constructor and clears | 30 // Simple wrapper class that sets the active URL in it's constructor and clears |
| 21 // the active URL in the destructor. | 31 // the active URL in the destructor. |
| 22 class ScopedActiveURLSetter { | 32 class ScopedActiveURLSetter { |
| 23 public: | 33 public: |
| 24 explicit ScopedActiveURLSetter(const GURL& url) { | 34 explicit ScopedActiveURLSetter(const GURL& url) { |
| 25 SetActiveURL(url); | 35 SetActiveURL(url); |
| 26 } | 36 } |
| 27 | 37 |
| 28 ~ScopedActiveURLSetter() { | 38 ~ScopedActiveURLSetter() { |
| 29 SetActiveURL(GURL()); | 39 SetActiveURL(GURL()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 50 ClearCrashKeyValueFuncPtr clear_key_func); | 60 ClearCrashKeyValueFuncPtr clear_key_func); |
| 51 | 61 |
| 52 extern const int kMaxNumCrashURLChunks; | 62 extern const int kMaxNumCrashURLChunks; |
| 53 extern const int kMaxNumURLChunkValueLength; | 63 extern const int kMaxNumURLChunkValueLength; |
| 54 extern const char *kUrlChunkFormatStr; | 64 extern const char *kUrlChunkFormatStr; |
| 55 } // namespace child_process_logging | 65 } // namespace child_process_logging |
| 56 | 66 |
| 57 #endif // defined(OS_MACOSX) && __OBJC__ | 67 #endif // defined(OS_MACOSX) && __OBJC__ |
| 58 | 68 |
| 59 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ | 69 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ |
| OLD | NEW |