Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 615083004: Use ThreadChecker rather than DCHECK_CURRENTLY_ON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698