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/browser/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 if (!extension->is_theme() && extension->location() != Extension::COMPONENT) | 2120 if (!extension->is_theme() && extension->location() != Extension::COMPONENT) |
2121 extension_ids.insert(extension->id()); | 2121 extension_ids.insert(extension->id()); |
2122 } | 2122 } |
2123 | 2123 |
2124 child_process_logging::SetActiveExtensions(extension_ids); | 2124 child_process_logging::SetActiveExtensions(extension_ids); |
2125 } | 2125 } |
2126 | 2126 |
2127 void ExtensionService::OnExtensionInstalled( | 2127 void ExtensionService::OnExtensionInstalled( |
2128 const Extension* extension, | 2128 const Extension* extension, |
2129 bool from_webstore, | 2129 bool from_webstore, |
2130 const StringOrdinal& page_ordinal) { | 2130 const syncer::StringOrdinal& page_ordinal) { |
2131 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2131 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
2132 | 2132 |
2133 // Ensure extension is deleted unless we transfer ownership. | 2133 // Ensure extension is deleted unless we transfer ownership. |
2134 scoped_refptr<const Extension> scoped_extension(extension); | 2134 scoped_refptr<const Extension> scoped_extension(extension); |
2135 const std::string& id = extension->id(); | 2135 const std::string& id = extension->id(); |
2136 // Extensions installed by policy can't be disabled. So even if a previous | 2136 // Extensions installed by policy can't be disabled. So even if a previous |
2137 // installation disabled the extension, make sure it is now enabled. | 2137 // installation disabled the extension, make sure it is now enabled. |
2138 bool initial_enable = | 2138 bool initial_enable = |
2139 !extension_prefs_->IsExtensionDisabled(id) || | 2139 !extension_prefs_->IsExtensionDisabled(id) || |
2140 system_->management_policy()->MustRemainEnabled(extension, NULL); | 2140 system_->management_policy()->MustRemainEnabled(extension, NULL); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2624 extensions::ExtensionHost* extension_host) { | 2624 extensions::ExtensionHost* extension_host) { |
2625 if (!extension_host) | 2625 if (!extension_host) |
2626 return; | 2626 return; |
2627 | 2627 |
2628 #if !defined(OS_ANDROID) | 2628 #if !defined(OS_ANDROID) |
2629 extensions::LaunchPlatformApp(extension_host->profile(), | 2629 extensions::LaunchPlatformApp(extension_host->profile(), |
2630 extension_host->extension(), | 2630 extension_host->extension(), |
2631 NULL, FilePath()); | 2631 NULL, FilePath()); |
2632 #endif | 2632 #endif |
2633 } | 2633 } |
OLD | NEW |