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

Side by Side Diff: chrome/common/child_process_logging.h

Issue 3186028: Make crash reporting client_id accessible through child_process_logging. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: address mark's feedback Created 10 years, 3 months 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 (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 "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 14
15 class GPUInfo; 15 class GPUInfo;
16 16
17 #if defined(OS_WIN) 17 #if defined(OS_WIN)
18 // The maximum number of active extensions we will report. 18 // 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 19 // Also used in chrome/app, but we define it here to avoid a common->app
20 // dependency. 20 // dependency.
21 static const int kMaxReportedActiveExtensions = 10; 21 static const int kMaxReportedActiveExtensions = 10;
22 #endif 22 #endif
23 23
24 namespace child_process_logging { 24 namespace child_process_logging {
25 25
26 #if defined(OS_LINUX)
27 // These are declared here so the crash reporter can access them directly in
28 // compromised context without going through the standard library.
29 extern char g_active_url[];
30 extern char g_client_id[];
31 #endif
32
26 // Sets the URL that is logged if the child process crashes. Use GURL() to clear 33 // Sets the URL that is logged if the child process crashes. Use GURL() to clear
27 // the URL. 34 // the URL.
28 void SetActiveURL(const GURL& url); 35 void SetActiveURL(const GURL& url);
29 36
30 // Sets the Client ID that is used as GUID if a Chrome process crashes. 37 // Sets the Client ID that is used as GUID if a Chrome process crashes.
31 void SetClientId(const std::string& client_id); 38 void SetClientId(const std::string& client_id);
32 39
40 // Gets the Client ID to be used as GUID for crash reporting. Returns the client
41 // id in |client_id| if it's known, an empty string otherwise.
42 std::string GetClientId();
43
33 // Sets the list of "active" extensions in this process. We overload "active" to 44 // Sets the list of "active" extensions in this process. We overload "active" to
34 // mean different things depending on the process type: 45 // mean different things depending on the process type:
35 // - browser: all enabled extensions 46 // - browser: all enabled extensions
36 // - renderer: the unique set of extension ids from all content scripts 47 // - renderer: the unique set of extension ids from all content scripts
37 // - extension: the id of each extension running in this process (there can be 48 // - extension: the id of each extension running in this process (there can be
38 // multiple because of process collapsing). 49 // multiple because of process collapsing).
39 void SetActiveExtensions(const std::set<std::string>& extension_ids); 50 void SetActiveExtensions(const std::set<std::string>& extension_ids);
40 51
41 // Sets the data on the gpu to send along with crash reports. 52 // Sets the data on the gpu to send along with crash reports.
42 void SetGpuInfo(const GPUInfo& gpu_info); 53 void SetGpuInfo(const GPUInfo& gpu_info);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ClearCrashKeyValueFuncPtr clear_key_func); 85 ClearCrashKeyValueFuncPtr clear_key_func);
75 86
76 extern const int kMaxNumCrashURLChunks; 87 extern const int kMaxNumCrashURLChunks;
77 extern const int kMaxNumURLChunkValueLength; 88 extern const int kMaxNumURLChunkValueLength;
78 extern const char *kUrlChunkFormatStr; 89 extern const char *kUrlChunkFormatStr;
79 } // namespace child_process_logging 90 } // namespace child_process_logging
80 91
81 #endif // defined(OS_MACOSX) && __OBJC__ 92 #endif // defined(OS_MACOSX) && __OBJC__
82 93
83 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 94 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_child_process_host.cc ('k') | chrome/common/child_process_logging_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698