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

Side by Side Diff: content/shell/browser/layout_test/layout_test_notification_manager.cc

Issue 1726323002: Have Permission{Manager,Service} use Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 "content/shell/browser/layout_test/layout_test_notification_manager.h" 5 #include "content/shell/browser/layout_test/layout_test_notification_manager.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/desktop_notification_delegate.h" 10 #include "content/public/browser/desktop_notification_delegate.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 persistent_notifications_.find(previous_title); 205 persistent_notifications_.find(previous_title);
206 if (persistent_notification_iter != persistent_notifications_.end()) 206 if (persistent_notification_iter != persistent_notifications_.end())
207 persistent_notifications_.erase(persistent_notification_iter); 207 persistent_notifications_.erase(persistent_notification_iter);
208 } 208 }
209 209
210 replacements_[tag] = base::UTF16ToUTF8(notification_data.title); 210 replacements_[tag] = base::UTF16ToUTF8(notification_data.title);
211 } 211 }
212 212
213 blink::WebNotificationPermission 213 blink::WebNotificationPermission
214 LayoutTestNotificationManager::CheckPermission(const GURL& origin) { 214 LayoutTestNotificationManager::CheckPermission(const GURL& origin) {
215 return ToWebNotificationPermission(LayoutTestContentBrowserClient::Get() 215 const url::Origin actual_origin(origin);
216 ->GetLayoutTestBrowserContext() 216 return ToWebNotificationPermission(
217 ->GetLayoutTestPermissionManager() 217 LayoutTestContentBrowserClient::Get()
218 ->GetPermissionStatus(PermissionType::NOTIFICATIONS, 218 ->GetLayoutTestBrowserContext()
219 origin, 219 ->GetLayoutTestPermissionManager()
220 origin)); 220 ->GetPermissionStatus(PermissionType::NOTIFICATIONS, actual_origin,
221 actual_origin));
221 } 222 }
222 223
223 } // namespace content 224 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698