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

Unified Diff: cloud_print/virtual_driver/posix/installer_util_mac.mm

Issue 9307087: Remove code for Mac and Linux virtual print drivers. (Closed)
Patch Set: Nuke linux too Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: cloud_print/virtual_driver/posix/installer_util_mac.mm
diff --git a/cloud_print/virtual_driver/posix/installer_util_mac.mm b/cloud_print/virtual_driver/posix/installer_util_mac.mm
deleted file mode 100644
index 5b198664b8433233645bb0d025d2750d9a1590a1..0000000000000000000000000000000000000000
--- a/cloud_print/virtual_driver/posix/installer_util_mac.mm
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cloud_print/virtual_driver/posix/installer_util_mac.h"
-
-#import <ApplicationServices/ApplicationServices.h>
-#import <Foundation/NSAutoreleasePool.h>
-#import <Foundation/NSAppleEventDescriptor.h>
-#import <CoreServices/CoreServices.h>
-
-#include "base/mac/foundation_util.h"
-
-#include <stdlib.h>
-#include <string>
-#include <iostream>
-
-namespace cloud_print {
-// Sends an event of a class Type sendClass to the Chromium
-// service process. Used to install and uninstall the Cloud
-// Print driver on Mac.
-void sendServiceProcessEvent(const AEEventClass sendClass) {
- FSRef ref;
- OSStatus status = noErr;
- CFURLRef* kDontWantURL = NULL;
-
- std::string bundleID = base::mac::BaseBundleID();
- CFStringRef bundleIDCF = CFStringCreateWithCString(NULL, bundleID.c_str(),
- kCFStringEncodingUTF8);
-
- status = LSFindApplicationForInfo(kLSUnknownCreator, bundleIDCF, NULL,
- &ref, kDontWantURL);
-
- if (status != noErr) {
- std::cerr << "Failed to make path ref: "
- << GetMacOSStatusErrorString(status)
- << " ("
- << status
- << ")";
- exit(-1);
- }
-
- NSAppleEventDescriptor* sendEvent =
- [NSAppleEventDescriptor appleEventWithEventClass:sendClass
- eventID:sendClass
- targetDescriptor:nil
- returnID:kAutoGenerateReturnID
- transactionID:kAnyTransactionID];
- if (sendEvent == nil) {
- // Write to system error log using cerr.
- std::cerr << "Unable to create Apple Event";
- }
- LSApplicationParameters params = { 0, kLSLaunchDefaults, &ref, NULL, NULL,
- NULL, NULL };
- AEDesc* initialEvent = const_cast<AEDesc*> ([sendEvent aeDesc]);
- params.initialEvent = static_cast<AppleEvent*> (initialEvent);
- status = LSOpenApplication(&params, NULL);
-
- if (status != noErr) {
- std::cerr << "Unable to launch Chrome to install: "
- << GetMacOSStatusErrorString(status)
- << " ("
- << status
- << ")";
- exit(-1);
- }
-}
-
-} // namespace cloud_print

Powered by Google App Engine
This is Rietveld 408576698