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

Side by Side Diff: ios/chrome/browser/install_time_util.mm

Issue 2566993002: [ObjC ARC] Converts ios/chrome/browser:browser to ARC. (Closed)
Patch Set: comments Created 4 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 | « ios/chrome/browser/file_metadata_util.mm ('k') | ios/chrome/browser/installation_notifier.mm » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ios/chrome/browser/install_time_util.h" 5 #include "ios/chrome/browser/install_time_util.h"
6 6
7 #include <Foundation/Foundation.h> 7 #include <Foundation/Foundation.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
11 11
12 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support."
14 #endif
15
12 namespace { 16 namespace {
13 17
14 NSString* const kInstallationTimeKey = @"omaha.InstallationTime"; 18 NSString* const kInstallationTimeKey = @"omaha.InstallationTime";
15 19
16 // Returns the installation time of the application: this is the time the 20 // Returns the installation time of the application: this is the time the
17 // application was first installed, not the time the last version was installed. 21 // application was first installed, not the time the last version was installed.
18 // If the installation time is unknown, returns a base::Time corresponding to 22 // If the installation time is unknown, returns a base::Time corresponding to
19 // |kUnknownInstallDate|. 23 // |kUnknownInstallDate|.
20 // To be noted: this value is reset if the application is uninstalled. 24 // To be noted: this value is reset if the application is uninstalled.
21 base::Time GetNSUserDefaultsInstallationTime() { 25 base::Time GetNSUserDefaultsInstallationTime() {
(...skipping 23 matching lines...) Expand all
45 if (is_first_run) 49 if (is_first_run)
46 return base::Time::Now(); 50 return base::Time::Now();
47 51
48 if (ns_user_defaults_install_time.is_null()) 52 if (ns_user_defaults_install_time.is_null())
49 return base::Time::FromTimeT(kUnknownInstallDate); 53 return base::Time::FromTimeT(kUnknownInstallDate);
50 54
51 return ns_user_defaults_install_time; 55 return ns_user_defaults_install_time;
52 } 56 }
53 57
54 } // namespace install_time_util 58 } // namespace install_time_util
OLDNEW
« no previous file with comments | « ios/chrome/browser/file_metadata_util.mm ('k') | ios/chrome/browser/installation_notifier.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698