| 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/browser/extensions/chrome_extension_web_contents_observer.h" | 5 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/error_console/error_console.h" | 10 #include "chrome/browser/extensions/error_console/error_console.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 12 #include "chrome/browser/extensions/window_controller.h" | 12 #include "chrome/browser/extensions/window_controller.h" |
| 13 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 13 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 14 #include "chrome/common/extensions/chrome_extension_messages.h" | 14 #include "chrome/common/extensions/chrome_extension_messages.h" |
| 15 #include "chrome/common/extensions/extension_process_policy.h" | |
| 16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 17 #include "components/rappor/rappor_service_impl.h" | 16 #include "components/rappor/rappor_service_impl.h" |
| 18 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
| 19 #include "content/public/browser/child_process_security_policy.h" | 18 #include "content/public/browser/child_process_security_policy.h" |
| 20 #include "content/public/browser/navigation_handle.h" | 19 #include "content/public/browser/navigation_handle.h" |
| 21 #include "content/public/browser/render_frame_host.h" | 20 #include "content/public/browser/render_frame_host.h" |
| 22 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 23 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
| 24 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
| 25 #include "extensions/browser/extension_registry.h" | 24 #include "extensions/browser/extension_registry.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // TODO(yoz): This reload doesn't happen synchronously for unpacked | 145 // TODO(yoz): This reload doesn't happen synchronously for unpacked |
| 147 // extensions. It seems to be fast enough, but there is a race. | 146 // extensions. It seems to be fast enough, but there is a race. |
| 148 // We should delay loading until the extension has reloaded. | 147 // We should delay loading until the extension has reloaded. |
| 149 if (registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)) { | 148 if (registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)) { |
| 150 ExtensionSystem::Get(browser_context())-> | 149 ExtensionSystem::Get(browser_context())-> |
| 151 extension_service()->ReloadExtension(extension_id); | 150 extension_service()->ReloadExtension(extension_id); |
| 152 } | 151 } |
| 153 } | 152 } |
| 154 | 153 |
| 155 } // namespace extensions | 154 } // namespace extensions |
| OLD | NEW |