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

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

Issue 2884693002: Rename the XPC identifier to use the outer bundle (Closed)
Patch Set: git diff Created 3 years, 7 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/notification_constants_mac.mm » ('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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // If NO, then -serviceProxy will set the exception port. 494 // If NO, then -serviceProxy will set the exception port.
495 BOOL setExceptionPort_; 495 BOOL setExceptionPort_;
496 } 496 }
497 497
498 - (instancetype)init { 498 - (instancetype)init {
499 if ((self = [super init])) { 499 if ((self = [super init])) {
500 xpcConnection_.reset([[NSXPCConnection alloc] 500 xpcConnection_.reset([[NSXPCConnection alloc]
501 initWithServiceName: 501 initWithServiceName:
502 [NSString 502 [NSString
503 stringWithFormat:notification_constants::kAlertXPCServiceName, 503 stringWithFormat:notification_constants::kAlertXPCServiceName,
504 [base::mac::FrameworkBundle() 504 [base::mac::OuterBundle() bundleIdentifier]]]);
505 bundleIdentifier]]]);
506 xpcConnection_.get().remoteObjectInterface = 505 xpcConnection_.get().remoteObjectInterface =
507 [NSXPCInterface interfaceWithProtocol:@protocol(NotificationDelivery)]; 506 [NSXPCInterface interfaceWithProtocol:@protocol(NotificationDelivery)];
508 507
509 xpcConnection_.get().interruptionHandler = ^{ 508 xpcConnection_.get().interruptionHandler = ^{
510 // We will be getting this handler both when the XPC server crashes or 509 // We will be getting this handler both when the XPC server crashes or
511 // when it decides to close the connection. 510 // when it decides to close the connection.
512 LOG(WARNING) << "AlertNotificationService: XPC connection interrupted."; 511 LOG(WARNING) << "AlertNotificationService: XPC connection interrupted.";
513 RecordXPCEvent(INTERRUPTED); 512 RecordXPCEvent(INTERRUPTED);
514 setExceptionPort_ = NO; 513 setExceptionPort_ = NO;
515 }; 514 };
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 base::scoped_nsobject<CrXPCMachPort> xpcPort( 602 base::scoped_nsobject<CrXPCMachPort> xpcPort(
604 [[CrXPCMachPort alloc] initWithMachSendRight:std::move(exceptionPort)]); 603 [[CrXPCMachPort alloc] initWithMachSendRight:std::move(exceptionPort)]);
605 [proxy setMachExceptionPort:xpcPort]; 604 [proxy setMachExceptionPort:xpcPort];
606 setExceptionPort_ = YES; 605 setExceptionPort_ = YES;
607 } 606 }
608 607
609 return proxy; 608 return proxy;
610 } 609 }
611 610
612 @end 611 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/notifications/notification_constants_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698