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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_notification_manager.cc

Issue 1843063002: Don't show scheme in permission prompts if it is HTTPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oops mac compile again 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_notification_manager.h" 5 #include "chrome/browser/push_messaging/push_messaging_notification_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <bitset> 9 #include <bitset>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 content::StoragePartition* GetStoragePartition(Profile* profile, 60 content::StoragePartition* GetStoragePartition(Profile* profile,
61 const GURL& origin) { 61 const GURL& origin) {
62 return content::BrowserContext::GetStoragePartitionForSite(profile, origin); 62 return content::BrowserContext::GetStoragePartitionForSite(profile, origin);
63 } 63 }
64 64
65 NotificationDatabaseData CreateDatabaseData( 65 NotificationDatabaseData CreateDatabaseData(
66 const GURL& origin, 66 const GURL& origin,
67 int64_t service_worker_registration_id) { 67 int64_t service_worker_registration_id) {
68 PlatformNotificationData notification_data; 68 PlatformNotificationData notification_data;
69 notification_data.title = 69 notification_data.title = url_formatter::FormatUrlForSecurityDisplay(
70 url_formatter::FormatUrlForSecurityDisplayOmitScheme(origin); 70 origin, url_formatter::SchemeDisplay::OMIT_WEB);
71 notification_data.direction = 71 notification_data.direction =
72 PlatformNotificationData::DIRECTION_LEFT_TO_RIGHT; 72 PlatformNotificationData::DIRECTION_LEFT_TO_RIGHT;
73 notification_data.body = 73 notification_data.body =
74 l10n_util::GetStringUTF16(IDS_PUSH_MESSAGING_GENERIC_NOTIFICATION_BODY); 74 l10n_util::GetStringUTF16(IDS_PUSH_MESSAGING_GENERIC_NOTIFICATION_BODY);
75 notification_data.tag = kPushMessagingForcedNotificationTag; 75 notification_data.tag = kPushMessagingForcedNotificationTag;
76 notification_data.icon = GURL(); 76 notification_data.icon = GURL();
77 notification_data.silent = true; 77 notification_data.silent = true;
78 78
79 NotificationDatabaseData database_data; 79 NotificationDatabaseData database_data;
80 database_data.origin = origin; 80 database_data.origin = origin;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 message_handled_closure.Run(); 326 message_handled_closure.Run();
327 return; 327 return;
328 } 328 }
329 329
330 PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification( 330 PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification(
331 profile_, persistent_notification_id, origin, notification_data, 331 profile_, persistent_notification_id, origin, notification_data,
332 NotificationResources()); 332 NotificationResources());
333 333
334 message_handled_closure.Run(); 334 message_handled_closure.Run();
335 } 335 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698