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

Side by Side Diff: chrome/browser/first_run/upgrade_util_linux.cc

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 6 years 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 | « chrome/browser/first_run/upgrade_util.cc ('k') | chrome/browser/first_run/upgrade_util_mac.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/first_run/upgrade_util.h" 5 #include "chrome/browser/first_run/upgrade_util.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/process/launch.h" 13 #include "base/process/launch.h"
14 #include "chrome/browser/first_run/upgrade_util_linux.h" 14 #include "chrome/browser/first_run/upgrade_util_linux.h"
15 15
16 namespace { 16 namespace {
17 17
18 double saved_last_modified_time_of_exe = 0; 18 double saved_last_modified_time_of_exe = 0;
19 19
20 } // namespace 20 } // namespace
21 21
22 namespace upgrade_util { 22 namespace upgrade_util {
23 23
24 bool RelaunchChromeBrowser(const CommandLine& command_line) { 24 bool RelaunchChromeBrowser(const base::CommandLine& command_line) {
25 base::LaunchOptions options; 25 base::LaunchOptions options;
26 // Don't set NO_NEW_PRIVS on the relaunched browser process. 26 // Don't set NO_NEW_PRIVS on the relaunched browser process.
27 options.allow_new_privs = true; 27 options.allow_new_privs = true;
28 return base::LaunchProcess(command_line, options, NULL); 28 return base::LaunchProcess(command_line, options, NULL);
29 } 29 }
30 30
31 bool IsUpdatePendingRestart() { 31 bool IsUpdatePendingRestart() {
32 return saved_last_modified_time_of_exe != GetLastModifiedTimeOfExe(); 32 return saved_last_modified_time_of_exe != GetLastModifiedTimeOfExe();
33 } 33 }
34 34
(...skipping 10 matching lines...) Expand all
45 base::File::Info exe_file_info; 45 base::File::Info exe_file_info;
46 if (!base::GetFileInfo(exe_file_path, &exe_file_info)) { 46 if (!base::GetFileInfo(exe_file_path, &exe_file_info)) {
47 LOG(WARNING) << "Failed to get FileInfo object for FILE_EXE - " 47 LOG(WARNING) << "Failed to get FileInfo object for FILE_EXE - "
48 << exe_file_path.value(); 48 << exe_file_path.value();
49 return saved_last_modified_time_of_exe; 49 return saved_last_modified_time_of_exe;
50 } 50 }
51 return exe_file_info.last_modified.ToDoubleT(); 51 return exe_file_info.last_modified.ToDoubleT();
52 } 52 }
53 53
54 } // namespace upgrade_util 54 } // namespace upgrade_util
OLDNEW
« no previous file with comments | « chrome/browser/first_run/upgrade_util.cc ('k') | chrome/browser/first_run/upgrade_util_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698