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

Side by Side Diff: chrome/browser/mac/relauncher.cc

Issue 9235084: Add OSSTATUS_LOG API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/mac/relauncher.h" 5 #include "chrome/browser/mac/relauncher.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #include <AvailabilityMacros.h> 8 #include <AvailabilityMacros.h>
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <string.h> 10 #include <string.h>
11 #include <sys/event.h> 11 #include <sys/event.h>
12 #include <sys/time.h> 12 #include <sys/time.h>
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <unistd.h> 14 #include <unistd.h>
15 15
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "base/basictypes.h" 19 #include "base/basictypes.h"
20 #include "base/eintr_wrapper.h" 20 #include "base/eintr_wrapper.h"
21 #include "base/file_util.h" 21 #include "base/file_util.h"
22 #include "base/logging.h" 22 #include "base/logging.h"
23 #include "base/mac/mac_logging.h"
23 #include "base/mac/mac_util.h" 24 #include "base/mac/mac_util.h"
24 #include "base/mac/scoped_cftyperef.h" 25 #include "base/mac/scoped_cftyperef.h"
25 #include "base/path_service.h" 26 #include "base/path_service.h"
26 #include "base/process_util.h" 27 #include "base/process_util.h"
27 #include "base/stringprintf.h" 28 #include "base/stringprintf.h"
28 #include "base/sys_string_conversions.h" 29 #include "base/sys_string_conversions.h"
29 #include "chrome/browser/mac/install_from_dmg.h" 30 #include "chrome/browser/mac/install_from_dmg.h"
30 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
31 #include "content/public/common/content_paths.h" 32 #include "content/public/common/content_paths.h"
32 #include "content/public/common/content_switches.h" 33 #include "content/public/common/content_switches.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 (background ? kLSLaunchDontSwitch : 0), 364 (background ? kLSLaunchDontSwitch : 0),
364 &app_fsref, 365 &app_fsref,
365 NULL, // asyncLaunchRefCon 366 NULL, // asyncLaunchRefCon
366 NULL, // environment 367 NULL, // environment
367 relaunch_args, 368 relaunch_args,
368 NULL // initialEvent 369 NULL // initialEvent
369 }; 370 };
370 371
371 OSStatus status = LSOpenApplication(&ls_parameters, NULL); 372 OSStatus status = LSOpenApplication(&ls_parameters, NULL);
372 if (status != noErr) { 373 if (status != noErr) {
373 LOG(ERROR) << "LSOpenApplication: " << status; 374 OSSTATUS_LOG(ERROR, status) << "LSOpenApplication";
374 return 1; 375 return 1;
375 } 376 }
376 377
377 // The application should have relaunched (or is in the process of 378 // The application should have relaunched (or is in the process of
378 // relaunching). From this point on, only clean-up tasks should occur, and 379 // relaunching). From this point on, only clean-up tasks should occur, and
379 // failures are tolerable. 380 // failures are tolerable.
380 381
381 if (!dmg_bsd_device_name.empty()) { 382 if (!dmg_bsd_device_name.empty()) {
382 EjectAndTrashDiskImage(dmg_bsd_device_name); 383 EjectAndTrashDiskImage(dmg_bsd_device_name);
383 } 384 }
384 385
385 return 0; 386 return 0;
386 } 387 }
387 388
388 } // namespace internal 389 } // namespace internal
389 390
390 } // namespace mac_relauncher 391 } // namespace mac_relauncher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698