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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context_unittest.cc

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed patch conflict Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/geolocation/geolocation_permission_context_unittest.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
index 790168a13a83f7f0da870ec818bb560e70c9465f..926b85825e72e5dd6adca96efa35b3a994b858c1 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
@@ -17,6 +17,7 @@
#include "base/test/simple_test_clock.h"
#include "base/time/clock.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/geolocation/geolocation_permission_context_factory.h"
#include "chrome/browser/infobars/infobar_service.h"
@@ -328,8 +329,11 @@ void GeolocationPermissionContextTests::BubbleManagerDocumentLoadCompleted(
ContentSetting GeolocationPermissionContextTests::GetGeolocationContentSetting(
GURL frame_0, GURL frame_1) {
- return profile()->GetHostContentSettingsMap()->GetContentSetting(
- frame_0, frame_1, CONTENT_SETTINGS_TYPE_GEOLOCATION, std::string());
+ return HostContentSettingsMapFactory::GetForProfile(profile())
+ ->GetContentSetting(frame_0,
+ frame_1,
+ CONTENT_SETTINGS_TYPE_GEOLOCATION,
+ std::string());
}
bool GeolocationPermissionContextTests::BubbleEnabled() const {
@@ -831,7 +835,8 @@ TEST_F(GeolocationPermissionContextTests, LastUsageAudited) {
test_clock->SetNow(base::Time::UnixEpoch() +
base::TimeDelta::FromSeconds(10));
- HostContentSettingsMap* map = profile()->GetHostContentSettingsMap();
+ HostContentSettingsMap* map =
+ HostContentSettingsMapFactory::GetForProfile(profile());
map->SetPrefClockForTesting(scoped_ptr<base::Clock>(test_clock));
// The permission shouldn't have been used yet.
@@ -870,7 +875,8 @@ TEST_F(GeolocationPermissionContextTests, LastUsageAuditedMultipleFrames) {
test_clock->SetNow(base::Time::UnixEpoch() +
base::TimeDelta::FromSeconds(10));
- HostContentSettingsMap* map = profile()->GetHostContentSettingsMap();
+ HostContentSettingsMap* map =
+ HostContentSettingsMapFactory::GetForProfile(profile());
map->SetPrefClockForTesting(scoped_ptr<base::Clock>(test_clock));
GURL requesting_frame_0("http://www.example.com/geolocation");

Powered by Google App Engine
This is Rietveld 408576698