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

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

Issue 6835022: Broke ARM compile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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
« no previous file with comments | « chrome/browser/first_run/upgrade_util.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/first_run/upgrade_util.h"
6
7 #include "base/base_paths.h"
8 #include "base/command_line.h"
9 #include "base/file_path.h"
10 #include "base/file_util.h"
11 #include "base/logging.h"
12 #include "base/path_service.h"
13 #include "base/platform_file.h"
14 #include "base/process_util.h"
15
16 namespace {
17
18 double saved_last_modified_time_of_exe = 0;
19
20 } // namespace
21
22 namespace upgrade_util {
23
24 bool RelaunchChromeBrowser(const CommandLine& command_line) {
25 return base::LaunchApp(command_line, false, false, NULL);
26 }
27
28 bool IsUpdatePendingRestart() {
29 return saved_last_modified_time_of_exe != GetLastModifiedTimeOfExe();
30 }
31
32 void SaveLastModifiedTimeOfExe() {
33 saved_last_modified_time_of_exe = GetLastModifiedTimeOfExe();
34 }
35
36 double GetLastModifiedTimeOfExe() {
37 FilePath exe_file_path;
38 if (!PathService::Get(base::FILE_EXE, &exe_file_path)) {
39 LOG(WARNING) << "Failed to get FilePath object for FILE_EXE.";
40 return saved_last_modified_time_of_exe;
41 }
42 base::PlatformFileInfo exe_file_info;
43 if (!file_util::GetFileInfo(exe_file_path, &exe_file_info)) {
44 LOG(WARNING) << "Failed to get FileInfo object for FILE_EXE - "
45 << exe_file_path.value();
46 return saved_last_modified_time_of_exe;
47 }
48 return exe_file_info.last_modified.ToDoubleT();
49 }
50
51 } // namespace upgrade_util
OLDNEW
« no previous file with comments | « chrome/browser/first_run/upgrade_util.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698