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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_permission_context.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/push_messaging/push_messaging_permission_context.h" 5 #include "chrome/browser/push_messaging/push_messaging_permission_context.h"
6 6
7 #include "chrome/browser/content_settings/permission_context_uma_util.h" 7 #include "chrome/browser/content_settings/permission_context_uma_util.h"
8 #include "chrome/browser/notifications/desktop_notification_service.h" 8 #include "chrome/browser/notifications/desktop_notification_service.h"
9 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 9 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
10 #include "chrome/browser/permissions/permission_request_id.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "components/content_settings/core/browser/host_content_settings_map.h" 12 #include "components/content_settings/core/browser/host_content_settings_map.h"
12 #include "components/content_settings/core/common/permission_request_id.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 #include "content/public/browser/web_contents_delegate.h" 15 #include "content/public/browser/web_contents_delegate.h"
16 16
17 const ContentSettingsType kPushSettingType = 17 const ContentSettingsType kPushSettingType =
18 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING; 18 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING;
19 19
20 PushMessagingPermissionContext::PushMessagingPermissionContext(Profile* profile) 20 PushMessagingPermissionContext::PushMessagingPermissionContext(Profile* profile)
21 : PermissionContextBase(profile, CONTENT_SETTINGS_TYPE_PUSH_MESSAGING), 21 : PermissionContextBase(profile, CONTENT_SETTINGS_TYPE_PUSH_MESSAGING),
22 profile_(profile), 22 profile_(profile),
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback, 133 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
134 false /* persist */, notification_content_setting); 134 false /* persist */, notification_content_setting);
135 return; 135 return;
136 } 136 }
137 137
138 PermissionContextUmaUtil::PermissionGranted(kPushSettingType, 138 PermissionContextUmaUtil::PermissionGranted(kPushSettingType,
139 requesting_origin); 139 requesting_origin);
140 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback, 140 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
141 true /* persist */, CONTENT_SETTING_ALLOW); 141 true /* persist */, CONTENT_SETTING_ALLOW);
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698