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

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

Issue 902833003: Add a HostContentSettingsMap layer for Supervised Users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 5 years, 9 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 if (!host_content_settings_map_.get()) { 902 if (!host_content_settings_map_.get()) {
903 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); 903 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false);
904 #if defined(ENABLE_EXTENSIONS) 904 #if defined(ENABLE_EXTENSIONS)
905 ExtensionService* extension_service = 905 ExtensionService* extension_service =
906 extensions::ExtensionSystem::Get(this)->extension_service(); 906 extensions::ExtensionSystem::Get(this)->extension_service();
907 if (extension_service) { 907 if (extension_service) {
908 extension_service->RegisterContentSettings( 908 extension_service->RegisterContentSettings(
909 host_content_settings_map_.get()); 909 host_content_settings_map_.get());
910 } 910 }
911 #endif 911 #endif
912 #if defined(ENABLE_SUPERVISED_USERS)
913 SupervisedUserSettingsService* supervised_service =
914 SupervisedUserSettingsServiceFactory::GetForProfile(this);
915 supervised_service->RegisterContentSettings(
916 host_content_settings_map_.get());
917 #endif
912 } 918 }
913 return host_content_settings_map_.get(); 919 return host_content_settings_map_.get();
914 } 920 }
915 921
916 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() { 922 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() {
917 #if defined(ENABLE_EXTENSIONS) 923 #if defined(ENABLE_EXTENSIONS)
918 return extensions::GuestViewManager::FromBrowserContext(this); 924 return extensions::GuestViewManager::FromBrowserContext(this);
919 #else 925 #else
920 return NULL; 926 return NULL;
921 #endif 927 #endif
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 #if defined(ENABLE_EXTENSIONS) 1097 #if defined(ENABLE_EXTENSIONS)
1092 extension_policy_, 1098 extension_policy_,
1093 #endif 1099 #endif
1094 pref_service_.Pass(), 1100 pref_service_.Pass(),
1095 original_profile, 1101 original_profile,
1096 guest_session_, 1102 guest_session_,
1097 supervised_user_id_, 1103 supervised_user_id_,
1098 policy_service_.Pass(), 1104 policy_service_.Pass(),
1099 testing_factories_); 1105 testing_factories_);
1100 } 1106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698