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

Side by Side Diff: chrome/browser/notifications/notification_platform_bridge_mac.mm

Issue 2727003002: Rename the XPC identifier use the framework bundle (Closed)
Patch Set: rename sign_versioned_dir.in too Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/notifications/xpc-Info.plist » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/notifications/notification_platform_bridge_mac.h" 5 #include "chrome/browser/notifications/notification_platform_bridge_mac.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // The connection to the XPC server in charge of delivering alerts. 429 // The connection to the XPC server in charge of delivering alerts.
430 base::scoped_nsobject<NSXPCConnection> xpcConnection_; 430 base::scoped_nsobject<NSXPCConnection> xpcConnection_;
431 } 431 }
432 432
433 - (instancetype)init { 433 - (instancetype)init {
434 if ((self = [super init])) { 434 if ((self = [super init])) {
435 xpcConnection_.reset([[NSXPCConnection alloc] 435 xpcConnection_.reset([[NSXPCConnection alloc]
436 initWithServiceName: 436 initWithServiceName:
437 [NSString 437 [NSString
438 stringWithFormat:notification_constants::kAlertXPCServiceName, 438 stringWithFormat:notification_constants::kAlertXPCServiceName,
439 [base::mac::OuterBundle() bundleIdentifier]]]); 439 [base::mac::FrameworkBundle()
440 bundleIdentifier]]]);
440 xpcConnection_.get().remoteObjectInterface = 441 xpcConnection_.get().remoteObjectInterface =
441 [NSXPCInterface interfaceWithProtocol:@protocol(NotificationDelivery)]; 442 [NSXPCInterface interfaceWithProtocol:@protocol(NotificationDelivery)];
442 443
443 xpcConnection_.get().interruptionHandler = ^{ 444 xpcConnection_.get().interruptionHandler = ^{
444 LOG(WARNING) << "connection interrupted: interruptionHandler: "; 445 LOG(WARNING) << "connection interrupted: interruptionHandler: ";
445 // TODO(miguelg): perhaps add some UMA here. 446 // TODO(miguelg): perhaps add some UMA here.
446 // We will be getting this handler both when the XPC server crashes or 447 // We will be getting this handler both when the XPC server crashes or
447 // when it decides to close the connection. 448 // when it decides to close the connection.
448 }; 449 };
449 xpcConnection_.get().invalidationHandler = ^{ 450 xpcConnection_.get().invalidationHandler = ^{
(...skipping 26 matching lines...) Expand all
476 [[xpcConnection_ remoteObjectProxy] closeAllNotifications]; 477 [[xpcConnection_ remoteObjectProxy] closeAllNotifications];
477 } 478 }
478 479
479 // NotificationReply implementation 480 // NotificationReply implementation
480 - (void)notificationClick:(NSDictionary*)notificationResponseData { 481 - (void)notificationClick:(NSDictionary*)notificationResponseData {
481 NotificationPlatformBridgeMac::ProcessNotificationResponse( 482 NotificationPlatformBridgeMac::ProcessNotificationResponse(
482 notificationResponseData); 483 notificationResponseData);
483 } 484 }
484 485
485 @end 486 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/notifications/xpc-Info.plist » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698