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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 615083004: Use ThreadChecker rather than DCHECK_CURRENTLY_ON. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK testing_profile 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) 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 return GetRequestContext(); 830 return GetRequestContext();
831 } 831 }
832 832
833 content::ResourceContext* TestingProfile::GetResourceContext() { 833 content::ResourceContext* TestingProfile::GetResourceContext() {
834 if (!resource_context_) 834 if (!resource_context_)
835 resource_context_ = new content::MockResourceContext(); 835 resource_context_ = new content::MockResourceContext();
836 return resource_context_; 836 return resource_context_;
837 } 837 }
838 838
839 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { 839 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() {
840 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
840 if (!host_content_settings_map_.get()) { 841 if (!host_content_settings_map_.get()) {
841 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); 842 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false);
842 #if defined(ENABLE_EXTENSIONS) 843 #if defined(ENABLE_EXTENSIONS)
843 ExtensionService* extension_service = 844 ExtensionService* extension_service =
844 extensions::ExtensionSystem::Get(this)->extension_service(); 845 extensions::ExtensionSystem::Get(this)->extension_service();
845 if (extension_service) { 846 if (extension_service) {
846 extension_service->RegisterContentSettings( 847 extension_service->RegisterContentSettings(
847 host_content_settings_map_.get()); 848 host_content_settings_map_.get());
848 } 849 }
849 #endif 850 #endif
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 #if defined(ENABLE_EXTENSIONS) 1030 #if defined(ENABLE_EXTENSIONS)
1030 extension_policy_, 1031 extension_policy_,
1031 #endif 1032 #endif
1032 pref_service_.Pass(), 1033 pref_service_.Pass(),
1033 original_profile, 1034 original_profile,
1034 guest_session_, 1035 guest_session_,
1035 supervised_user_id_, 1036 supervised_user_id_,
1036 policy_service_.Pass(), 1037 policy_service_.Pass(),
1037 testing_factories_); 1038 testing_factories_);
1038 } 1039 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698