| OLD | NEW |
| 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/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 return false; | 440 return false; |
| 441 return file_util::WriteFile(first_run_sentinel, "", 0) != -1; | 441 return file_util::WriteFile(first_run_sentinel, "", 0) != -1; |
| 442 } | 442 } |
| 443 | 443 |
| 444 std::string GetPingDelayPrefName() { | 444 std::string GetPingDelayPrefName() { |
| 445 return base::StringPrintf("%s.%s", | 445 return base::StringPrintf("%s.%s", |
| 446 installer::master_preferences::kDistroDict, | 446 installer::master_preferences::kDistroDict, |
| 447 installer::master_preferences::kDistroPingDelay); | 447 installer::master_preferences::kDistroPingDelay); |
| 448 } | 448 } |
| 449 | 449 |
| 450 void RegisterUserPrefs(PrefRegistrySyncable* registry) { | 450 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 451 registry->RegisterIntegerPref(GetPingDelayPrefName().c_str(), | 451 registry->RegisterIntegerPref( |
| 452 0, | 452 GetPingDelayPrefName().c_str(), |
| 453 PrefRegistrySyncable::UNSYNCABLE_PREF); | 453 0, |
| 454 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 454 } | 455 } |
| 455 | 456 |
| 456 bool RemoveSentinel() { | 457 bool RemoveSentinel() { |
| 457 base::FilePath first_run_sentinel; | 458 base::FilePath first_run_sentinel; |
| 458 if (!internal::GetFirstRunSentinelFilePath(&first_run_sentinel)) | 459 if (!internal::GetFirstRunSentinelFilePath(&first_run_sentinel)) |
| 459 return false; | 460 return false; |
| 460 return file_util::Delete(first_run_sentinel, false); | 461 return file_util::Delete(first_run_sentinel, false); |
| 461 } | 462 } |
| 462 | 463 |
| 463 bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { | 464 bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 internal::DoPostImportPlatformSpecificTasks(); | 762 internal::DoPostImportPlatformSpecificTasks(); |
| 762 } | 763 } |
| 763 | 764 |
| 764 bool DidPerformProfileImport(bool* exited_successfully) { | 765 bool DidPerformProfileImport(bool* exited_successfully) { |
| 765 if (exited_successfully) | 766 if (exited_successfully) |
| 766 *exited_successfully = profile_import_exited_successfully; | 767 *exited_successfully = profile_import_exited_successfully; |
| 767 return did_perform_profile_import; | 768 return did_perform_profile_import; |
| 768 } | 769 } |
| 769 | 770 |
| 770 } // namespace first_run | 771 } // namespace first_run |
| OLD | NEW |