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

Side by Side Diff: components/crash/content/app/crash_reporter_client.h

Issue 2717223003: Add WebView-specific whitelist for crash keys. (Closed)
Patch Set: Use non-allocating whitelist implementation. Add instrumentation tests. Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector>
11 12
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 15
15 #if !defined(OS_WIN) 16 #if !defined(OS_WIN)
16 namespace base { 17 namespace base {
17 class FilePath; 18 class FilePath;
18 } 19 }
19 #endif 20 #endif
20 21
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 #if defined(OS_WIN) 138 #if defined(OS_WIN)
138 virtual bool GetCrashMetricsLocation(base::string16* metrics_dir); 139 virtual bool GetCrashMetricsLocation(base::string16* metrics_dir);
139 #else 140 #else
140 virtual bool GetCrashMetricsLocation(base::FilePath* metrics_dir); 141 virtual bool GetCrashMetricsLocation(base::FilePath* metrics_dir);
141 #endif 142 #endif
142 143
143 // Register all of the potential crash keys that can be sent to the crash 144 // Register all of the potential crash keys that can be sent to the crash
144 // reporting server. Returns the size of the union of all keys. 145 // reporting server. Returns the size of the union of all keys.
145 virtual size_t RegisterCrashKeys(); 146 virtual size_t RegisterCrashKeys();
146 147
148 virtual bool UseCrashKeysWhiteList();
149
150 virtual std::vector<const char*> GetWhiteListedCrashKeys();
Tobias Sargeant 2017/02/28 22:18:55 Because the whitelist is not accessed in a comprom
gsennton 2017/03/01 15:53:02 If there aren't any whitelisted keys, shouldn't th
151
147 // Returns true if running in unattended mode (for automated testing). 152 // Returns true if running in unattended mode (for automated testing).
148 virtual bool IsRunningUnattended(); 153 virtual bool IsRunningUnattended();
149 154
150 // Returns true if the user has given consent to collect stats. 155 // Returns true if the user has given consent to collect stats.
151 virtual bool GetCollectStatsConsent(); 156 virtual bool GetCollectStatsConsent();
152 157
153 // Returns true if the client is currently in the chosen sample that will 158 // Returns true if the client is currently in the chosen sample that will
154 // report stats and crashes. Crashes should only be reported if this function 159 // report stats and crashes. Crashes should only be reported if this function
155 // returns true and GetCollectStatsConsent returns true. 160 // returns true and GetCollectStatsConsent returns true.
156 virtual bool GetCollectStatsInSample(); 161 virtual bool GetCollectStatsInSample();
(...skipping 17 matching lines...) Expand all
174 virtual bool ShouldEnableBreakpadMicrodumps(); 179 virtual bool ShouldEnableBreakpadMicrodumps();
175 #endif 180 #endif
176 181
177 // Returns true if breakpad should run in the given process type. 182 // Returns true if breakpad should run in the given process type.
178 virtual bool EnableBreakpadForProcess(const std::string& process_type); 183 virtual bool EnableBreakpadForProcess(const std::string& process_type);
179 }; 184 };
180 185
181 } // namespace crash_reporter 186 } // namespace crash_reporter
182 187
183 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 188 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698