OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1276 } | 1276 } |
1277 // Allow access for tests. | 1277 // Allow access for tests. |
1278 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1278 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1279 switches::kEnablePepperTesting)) { | 1279 switches::kEnablePepperTesting)) { |
1280 return true; | 1280 return true; |
1281 } | 1281 } |
1282 #endif // !defined(OS_ANDROID) | 1282 #endif // !defined(OS_ANDROID) |
1283 return false; | 1283 return false; |
1284 } | 1284 } |
1285 | 1285 |
1286 bool ChromeContentRendererClient::ShouldReportDetailedMessage( | |
1287 const GURL& url) const { | |
1288 // Currently, we are only interested in anything caused by an extension. | |
1289 // A source came from an extension if it is either directly from the | |
1290 // extension's url (chrome-extension://), or if it did not come from a real | |
1291 // url at all (as in the source being "event_bindings"). | |
Devlin
2013/07/11 00:55:35
Are there any other cases in which we know somethi
| |
1292 return !url.is_empty() && | |
1293 (!url.is_valid() || url.host() == extensions::kExtensionScheme); | |
1294 } | |
1286 | 1295 |
1287 } // namespace chrome | 1296 } // namespace chrome |
OLD | NEW |