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

Side by Side Diff: chrome/browser/mac/install_from_dmg.mm

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 (c) 2012 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/install_from_dmg.h" 5 #include "chrome/browser/mac/install_from_dmg.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #include <CoreFoundation/CoreFoundation.h> 9 #include <CoreFoundation/CoreFoundation.h>
10 #include <CoreServices/CoreServices.h> 10 #include <CoreServices/CoreServices.h>
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // call EjectAndTrashDiskImage on dmg_bsd_device_name. 358 // call EjectAndTrashDiskImage on dmg_bsd_device_name.
359 bool LaunchInstalledApp(NSString* installed_path, 359 bool LaunchInstalledApp(NSString* installed_path,
360 const std::string& dmg_bsd_device_name) { 360 const std::string& dmg_bsd_device_name) {
361 base::FilePath browser_path([installed_path fileSystemRepresentation]); 361 base::FilePath browser_path([installed_path fileSystemRepresentation]);
362 362
363 base::FilePath helper_path = browser_path.Append("Contents/Versions"); 363 base::FilePath helper_path = browser_path.Append("Contents/Versions");
364 helper_path = helper_path.Append(chrome::kChromeVersion); 364 helper_path = helper_path.Append(chrome::kChromeVersion);
365 helper_path = helper_path.Append(chrome::kHelperProcessExecutablePath); 365 helper_path = helper_path.Append(chrome::kHelperProcessExecutablePath);
366 366
367 std::vector<std::string> args = 367 std::vector<std::string> args =
368 CommandLine::ForCurrentProcess()->argv(); 368 base::CommandLine::ForCurrentProcess()->argv();
369 args[0] = browser_path.value(); 369 args[0] = browser_path.value();
370 370
371 std::vector<std::string> relauncher_args; 371 std::vector<std::string> relauncher_args;
372 if (!dmg_bsd_device_name.empty()) { 372 if (!dmg_bsd_device_name.empty()) {
373 std::string dmg_arg(mac_relauncher::kRelauncherDMGDeviceArg); 373 std::string dmg_arg(mac_relauncher::kRelauncherDMGDeviceArg);
374 dmg_arg.append(dmg_bsd_device_name); 374 dmg_arg.append(dmg_bsd_device_name);
375 relauncher_args.push_back(dmg_arg); 375 relauncher_args.push_back(dmg_arg);
376 } 376 }
377 377
378 return mac_relauncher::RelaunchAppWithHelper(helper_path.value(), 378 return mac_relauncher::RelaunchAppWithHelper(helper_path.value(),
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 const UInt8* trash_path_u8 = reinterpret_cast<const UInt8*>( 678 const UInt8* trash_path_u8 = reinterpret_cast<const UInt8*>(
679 trash_path.value().c_str()); 679 trash_path.value().c_str());
680 status = FNNotifyByPath(trash_path_u8, 680 status = FNNotifyByPath(trash_path_u8,
681 kFNDirectoryModifiedMessage, 681 kFNDirectoryModifiedMessage,
682 kNilOptions); 682 kNilOptions);
683 if (status != noErr) { 683 if (status != noErr) {
684 OSSTATUS_LOG(ERROR, status) << "FNNotifyByPath"; 684 OSSTATUS_LOG(ERROR, status) << "FNNotifyByPath";
685 return; 685 return;
686 } 686 }
687 } 687 }
OLDNEW
« no previous file with comments | « chrome/browser/locale_tests_browsertest.cc ('k') | chrome/browser/media/chrome_media_stream_infobar_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698