| 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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 if (!extension->is_theme() && extension->location() != Extension::COMPONENT) | 2106 if (!extension->is_theme() && extension->location() != Extension::COMPONENT) |
| 2107 extension_ids.insert(extension->id()); | 2107 extension_ids.insert(extension->id()); |
| 2108 } | 2108 } |
| 2109 | 2109 |
| 2110 child_process_logging::SetActiveExtensions(extension_ids); | 2110 child_process_logging::SetActiveExtensions(extension_ids); |
| 2111 } | 2111 } |
| 2112 | 2112 |
| 2113 void ExtensionService::OnExtensionInstalled( | 2113 void ExtensionService::OnExtensionInstalled( |
| 2114 const Extension* extension, | 2114 const Extension* extension, |
| 2115 bool from_webstore, | 2115 bool from_webstore, |
| 2116 const StringOrdinal& page_ordinal) { | 2116 const syncer::StringOrdinal& page_ordinal) { |
| 2117 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2117 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 2118 | 2118 |
| 2119 // Ensure extension is deleted unless we transfer ownership. | 2119 // Ensure extension is deleted unless we transfer ownership. |
| 2120 scoped_refptr<const Extension> scoped_extension(extension); | 2120 scoped_refptr<const Extension> scoped_extension(extension); |
| 2121 const std::string& id = extension->id(); | 2121 const std::string& id = extension->id(); |
| 2122 // Extensions installed by policy can't be disabled. So even if a previous | 2122 // Extensions installed by policy can't be disabled. So even if a previous |
| 2123 // installation disabled the extension, make sure it is now enabled. | 2123 // installation disabled the extension, make sure it is now enabled. |
| 2124 bool initial_enable = | 2124 bool initial_enable = |
| 2125 !extension_prefs_->IsExtensionDisabled(id) || | 2125 !extension_prefs_->IsExtensionDisabled(id) || |
| 2126 system_->management_policy()->MustRemainEnabled(extension, NULL); | 2126 system_->management_policy()->MustRemainEnabled(extension, NULL); |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2610 extensions::ExtensionHost* extension_host) { | 2610 extensions::ExtensionHost* extension_host) { |
| 2611 if (!extension_host) | 2611 if (!extension_host) |
| 2612 return; | 2612 return; |
| 2613 | 2613 |
| 2614 #if !defined(OS_ANDROID) | 2614 #if !defined(OS_ANDROID) |
| 2615 extensions::LaunchPlatformApp(extension_host->profile(), | 2615 extensions::LaunchPlatformApp(extension_host->profile(), |
| 2616 extension_host->extension(), | 2616 extension_host->extension(), |
| 2617 NULL, FilePath()); | 2617 NULL, FilePath()); |
| 2618 #endif | 2618 #endif |
| 2619 } | 2619 } |
| OLD | NEW |