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

Side by Side Diff: chrome/browser/content_settings/permission_context_base.cc

Issue 1166603002: Move PermissionRequestID to chrome/browser/permissions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_rfh
Patch Set: fix build Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/content_settings/permission_context_base.h" 5 #include "chrome/browser/content_settings/permission_context_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/content_settings/permission_bubble_request_impl.h" 9 #include "chrome/browser/content_settings/permission_bubble_request_impl.h"
10 #include "chrome/browser/content_settings/permission_context_uma_util.h" 10 #include "chrome/browser/content_settings/permission_context_uma_util.h"
11 #include "chrome/browser/content_settings/permission_queue_controller.h" 11 #include "chrome/browser/content_settings/permission_queue_controller.h"
12 #include "chrome/browser/permissions/permission_request_id.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" 14 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
14 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
15 #include "components/content_settings/core/browser/content_settings_utils.h" 16 #include "components/content_settings/core/browser/content_settings_utils.h"
16 #include "components/content_settings/core/browser/host_content_settings_map.h" 17 #include "components/content_settings/core/browser/host_content_settings_map.h"
17 #include "components/content_settings/core/common/permission_request_id.h"
18 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
19 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
20 #include "content/public/common/origin_util.h" 20 #include "content/public/common/origin_util.h"
21 21
22 PermissionContextBase::PermissionContextBase( 22 PermissionContextBase::PermissionContextBase(
23 Profile* profile, 23 Profile* profile,
24 const ContentSettingsType permission_type) 24 const ContentSettingsType permission_type)
25 : profile_(profile), 25 : profile_(profile),
26 permission_type_(permission_type), 26 permission_type_(permission_type),
27 weak_factory_(this) { 27 weak_factory_(this) {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin()); 247 DCHECK_EQ(requesting_origin, requesting_origin.GetOrigin());
248 DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin()); 248 DCHECK_EQ(embedding_origin, embedding_origin.GetOrigin());
249 DCHECK(content_setting == CONTENT_SETTING_ALLOW || 249 DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
250 content_setting == CONTENT_SETTING_BLOCK); 250 content_setting == CONTENT_SETTING_BLOCK);
251 251
252 profile_->GetHostContentSettingsMap()->SetContentSetting( 252 profile_->GetHostContentSettingsMap()->SetContentSetting(
253 ContentSettingsPattern::FromURLNoWildcard(requesting_origin), 253 ContentSettingsPattern::FromURLNoWildcard(requesting_origin),
254 ContentSettingsPattern::FromURLNoWildcard(embedding_origin), 254 ContentSettingsPattern::FromURLNoWildcard(embedding_origin),
255 permission_type_, std::string(), content_setting); 255 permission_type_, std::string(), content_setting);
256 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698