OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ios/chrome/browser/first_run/first_run.h" | 5 #include "ios/chrome/browser/first_run/first_run.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "components/pref_registry/pref_registry_syncable.h" | 10 #include "components/pref_registry/pref_registry_syncable.h" |
11 #include "ios/chrome/browser/chrome_paths.h" | 11 #include "ios/chrome/browser/chrome_paths.h" |
12 | 12 |
| 13 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 14 #error "This file requires ARC support." |
| 15 #endif |
| 16 |
13 namespace { | 17 namespace { |
14 | 18 |
15 // The absence of kSentinelFile file will tell us it is a first run. | 19 // The absence of kSentinelFile file will tell us it is a first run. |
16 const base::FilePath::CharType kSentinelFile[] = FILE_PATH_LITERAL("First Run"); | 20 const base::FilePath::CharType kSentinelFile[] = FILE_PATH_LITERAL("First Run"); |
17 | 21 |
18 // RLZ ping delay pref name. | 22 // RLZ ping delay pref name. |
19 const char kPingDelayPrefName[] = "distribution.ping_delay"; | 23 const char kPingDelayPrefName[] = "distribution.ping_delay"; |
20 | 24 |
21 } // namespace | 25 } // namespace |
22 | 26 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // static | 72 // static |
69 const char* FirstRun::GetPingDelayPrefName() { | 73 const char* FirstRun::GetPingDelayPrefName() { |
70 return kPingDelayPrefName; | 74 return kPingDelayPrefName; |
71 } | 75 } |
72 | 76 |
73 // static | 77 // static |
74 void FirstRun::RegisterProfilePrefs( | 78 void FirstRun::RegisterProfilePrefs( |
75 user_prefs::PrefRegistrySyncable* registry) { | 79 user_prefs::PrefRegistrySyncable* registry) { |
76 registry->RegisterIntegerPref(GetPingDelayPrefName(), 0); | 80 registry->RegisterIntegerPref(GetPingDelayPrefName(), 0); |
77 } | 81 } |
OLD | NEW |