OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/renderer/pepper/pepper_uma_host.h" | 5 #include "chrome/renderer/pepper/pepper_uma_host.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
8 #include "base/sha1.h" | 11 #include "base/sha1.h" |
9 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
10 #include "chrome/common/chrome_content_client.h" | 13 #include "chrome/common/chrome_content_client.h" |
11 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/render_messages.h" | 15 #include "chrome/common/render_messages.h" |
13 #include "chrome/renderer/chrome_content_renderer_client.h" | 16 #include "chrome/renderer/chrome_content_renderer_client.h" |
14 #include "content/public/renderer/pepper_plugin_instance.h" | 17 #include "content/public/renderer/pepper_plugin_instance.h" |
15 #include "content/public/renderer/render_thread.h" | 18 #include "content/public/renderer/render_thread.h" |
16 #include "content/public/renderer/renderer_ppapi_host.h" | 19 #include "content/public/renderer/renderer_ppapi_host.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 ppapi::host::HostMessageContext* context) { | 214 ppapi::host::HostMessageContext* context) { |
212 if (!IsPluginWhitelisted()) | 215 if (!IsPluginWhitelisted()) |
213 return PP_ERROR_NOACCESS; | 216 return PP_ERROR_NOACCESS; |
214 bool enabled = false; | 217 bool enabled = false; |
215 content::RenderThread::Get()->Send( | 218 content::RenderThread::Get()->Send( |
216 new ChromeViewHostMsg_IsCrashReportingEnabled(&enabled)); | 219 new ChromeViewHostMsg_IsCrashReportingEnabled(&enabled)); |
217 if (enabled) | 220 if (enabled) |
218 return PP_OK; | 221 return PP_OK; |
219 return PP_ERROR_FAILED; | 222 return PP_ERROR_FAILED; |
220 } | 223 } |
OLD | NEW |