| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 extension_sync_service_->SyncExtensionChangeIfNeeded(*extension); | 1890 extension_sync_service_->SyncExtensionChangeIfNeeded(*extension); |
| 1891 } | 1891 } |
| 1892 | 1892 |
| 1893 const Extension* ExtensionService::GetPendingExtensionUpdate( | 1893 const Extension* ExtensionService::GetPendingExtensionUpdate( |
| 1894 const std::string& id) const { | 1894 const std::string& id) const { |
| 1895 return delayed_installs_.GetByID(id); | 1895 return delayed_installs_.GetByID(id); |
| 1896 } | 1896 } |
| 1897 | 1897 |
| 1898 void ExtensionService::RegisterContentSettings( | 1898 void ExtensionService::RegisterContentSettings( |
| 1899 HostContentSettingsMap* host_content_settings_map) { | 1899 HostContentSettingsMap* host_content_settings_map) { |
| 1900 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1900 host_content_settings_map->RegisterProvider( | 1901 host_content_settings_map->RegisterProvider( |
| 1901 HostContentSettingsMap::INTERNAL_EXTENSION_PROVIDER, | 1902 HostContentSettingsMap::INTERNAL_EXTENSION_PROVIDER, |
| 1902 scoped_ptr<content_settings::ObservableProvider>( | 1903 scoped_ptr<content_settings::ObservableProvider>( |
| 1903 new content_settings::InternalExtensionProvider(this))); | 1904 new content_settings::InternalExtensionProvider(this))); |
| 1904 | 1905 |
| 1905 host_content_settings_map->RegisterProvider( | 1906 host_content_settings_map->RegisterProvider( |
| 1906 HostContentSettingsMap::CUSTOM_EXTENSION_PROVIDER, | 1907 HostContentSettingsMap::CUSTOM_EXTENSION_PROVIDER, |
| 1907 scoped_ptr<content_settings::ObservableProvider>( | 1908 scoped_ptr<content_settings::ObservableProvider>( |
| 1908 new content_settings::CustomExtensionProvider( | 1909 new content_settings::CustomExtensionProvider( |
| 1909 extensions::ContentSettingsService::Get( | 1910 extensions::ContentSettingsService::Get( |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2370 } | 2371 } |
| 2371 | 2372 |
| 2372 void ExtensionService::OnProfileDestructionStarted() { | 2373 void ExtensionService::OnProfileDestructionStarted() { |
| 2373 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2374 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2374 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2375 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2375 it != ids_to_unload.end(); | 2376 it != ids_to_unload.end(); |
| 2376 ++it) { | 2377 ++it) { |
| 2377 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2378 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2378 } | 2379 } |
| 2379 } | 2380 } |
| OLD | NEW |