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

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: 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 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 extension_sync_service_->SyncExtensionChangeIfNeeded(*extension); 1895 extension_sync_service_->SyncExtensionChangeIfNeeded(*extension);
1896 } 1896 }
1897 1897
1898 const Extension* ExtensionService::GetPendingExtensionUpdate( 1898 const Extension* ExtensionService::GetPendingExtensionUpdate(
1899 const std::string& id) const { 1899 const std::string& id) const {
1900 return delayed_installs_.GetByID(id); 1900 return delayed_installs_.GetByID(id);
1901 } 1901 }
1902 1902
1903 void ExtensionService::RegisterContentSettings( 1903 void ExtensionService::RegisterContentSettings(
1904 HostContentSettingsMap* host_content_settings_map) { 1904 HostContentSettingsMap* host_content_settings_map) {
1905 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1905 host_content_settings_map->RegisterProvider( 1906 host_content_settings_map->RegisterProvider(
1906 HostContentSettingsMap::INTERNAL_EXTENSION_PROVIDER, 1907 HostContentSettingsMap::INTERNAL_EXTENSION_PROVIDER,
1907 scoped_ptr<content_settings::ObservableProvider>( 1908 scoped_ptr<content_settings::ObservableProvider>(
1908 new content_settings::InternalExtensionProvider(this))); 1909 new content_settings::InternalExtensionProvider(this)));
1909 1910
1910 host_content_settings_map->RegisterProvider( 1911 host_content_settings_map->RegisterProvider(
1911 HostContentSettingsMap::CUSTOM_EXTENSION_PROVIDER, 1912 HostContentSettingsMap::CUSTOM_EXTENSION_PROVIDER,
1912 scoped_ptr<content_settings::ObservableProvider>( 1913 scoped_ptr<content_settings::ObservableProvider>(
1913 new content_settings::CustomExtensionProvider( 1914 new content_settings::CustomExtensionProvider(
1914 extensions::ContentSettingsService::Get( 1915 extensions::ContentSettingsService::Get(
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 } 2356 }
2356 2357
2357 void ExtensionService::OnProfileDestructionStarted() { 2358 void ExtensionService::OnProfileDestructionStarted() {
2358 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2359 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2359 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2360 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2360 it != ids_to_unload.end(); 2361 it != ids_to_unload.end();
2361 ++it) { 2362 ++it) {
2362 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2363 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2363 } 2364 }
2364 } 2365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698