OLD | NEW |
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 #include "chrome/browser/extensions/error_console/error_console.h" | 5 #include "chrome/browser/extensions/error_console/error_console.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
16 #include "chrome/browser/extensions/error_console/error_console_factory.h" | 16 #include "chrome/browser/extensions/error_console/error_console_factory.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/common/extensions/features/feature_channel.h" | |
19 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
20 #include "components/crx_file/id_util.h" | 19 #include "components/crx_file/id_util.h" |
21 #include "components/prefs/pref_service.h" | 20 #include "components/prefs/pref_service.h" |
22 #include "components/version_info/version_info.h" | 21 #include "components/version_info/version_info.h" |
23 #include "content/public/browser/notification_details.h" | 22 #include "content/public/browser/notification_details.h" |
24 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
25 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
26 #include "extensions/browser/extension_prefs.h" | 25 #include "extensions/browser/extension_prefs.h" |
27 #include "extensions/browser/extension_registry.h" | 26 #include "extensions/browser/extension_registry.h" |
28 #include "extensions/browser/extension_system.h" | 27 #include "extensions/browser/extension_system.h" |
29 #include "extensions/common/constants.h" | 28 #include "extensions/common/constants.h" |
30 #include "extensions/common/extension.h" | 29 #include "extensions/common/extension.h" |
31 #include "extensions/common/extension_set.h" | 30 #include "extensions/common/extension_set.h" |
32 #include "extensions/common/feature_switch.h" | 31 #include "extensions/common/feature_switch.h" |
| 32 #include "extensions/common/features/feature_channel.h" |
33 | 33 |
34 namespace extensions { | 34 namespace extensions { |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 // The key into the Extension prefs for an Extension's specific reporting | 38 // The key into the Extension prefs for an Extension's specific reporting |
39 // settings. | 39 // settings. |
40 const char kStoreExtensionErrorsPref[] = "store_extension_errors"; | 40 const char kStoreExtensionErrorsPref[] = "store_extension_errors"; |
41 | 41 |
42 // This is the default mask for which errors to report. That is, if an extension | 42 // This is the default mask for which errors to report. That is, if an extension |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 ExtensionRegistry::Get(profile_)->GetExtensionById( | 291 ExtensionRegistry::Get(profile_)->GetExtensionById( |
292 extension_id, ExtensionRegistry::EVERYTHING); | 292 extension_id, ExtensionRegistry::EVERYTHING); |
293 if (extension && extension->location() == Manifest::UNPACKED) | 293 if (extension && extension->location() == Manifest::UNPACKED) |
294 return (1 << ExtensionError::NUM_ERROR_TYPES) - 1; | 294 return (1 << ExtensionError::NUM_ERROR_TYPES) - 1; |
295 | 295 |
296 // Otherwise, use the default mask. | 296 // Otherwise, use the default mask. |
297 return default_mask_; | 297 return default_mask_; |
298 } | 298 } |
299 | 299 |
300 } // namespace extensions | 300 } // namespace extensions |
OLD | NEW |