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

Side by Side Diff: chrome/browser/permissions/permission_queue_controller.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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/permissions/permission_queue_controller.h" 5 #include "chrome/browser/permissions/permission_queue_controller.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
9 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h"
10 #include "chrome/browser/infobars/infobar_service.h" 11 #include "chrome/browser/infobars/infobar_service.h"
11 #include "chrome/browser/media/midi_permission_infobar_delegate.h" 12 #include "chrome/browser/media/midi_permission_infobar_delegate.h"
12 #include "chrome/browser/notifications/notification_permission_infobar_delegate. h" 13 #include "chrome/browser/notifications/notification_permission_infobar_delegate. h"
13 #include "chrome/browser/permissions/permission_context_uma_util.h" 14 #include "chrome/browser/permissions/permission_context_uma_util.h"
14 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/storage/durable_storage_permission_infobar_delegate.h" 16 #include "chrome/browser/storage/durable_storage_permission_infobar_delegate.h"
16 #include "chrome/browser/tab_contents/tab_util.h" 17 #include "chrome/browser/tab_contents/tab_util.h"
17 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
18 #include "components/content_settings/core/browser/host_content_settings_map.h" 19 #include "components/content_settings/core/browser/host_content_settings_map.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 391 }
391 392
392 ContentSetting content_setting = 393 ContentSetting content_setting =
393 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; 394 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
394 395
395 ContentSettingsPattern embedder_pattern = 396 ContentSettingsPattern embedder_pattern =
396 (type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) ? 397 (type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) ?
397 ContentSettingsPattern::Wildcard() : 398 ContentSettingsPattern::Wildcard() :
398 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); 399 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin());
399 400
400 profile_->GetHostContentSettingsMap()->SetContentSetting( 401 HostContentSettingsMapFactory::GetForProfile(profile_)->SetContentSetting(
401 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), 402 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()),
402 embedder_pattern, 403 embedder_pattern,
403 type_, 404 type_,
404 std::string(), 405 std::string(),
405 content_setting); 406 content_setting);
406 } 407 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_manager_unittest.cc ('k') | chrome/browser/plugins/plugin_info_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698