| 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 installer::master_preferences::kDistroPingDelay); | 614 installer::master_preferences::kDistroPingDelay); |
| 615 } | 615 } |
| 616 | 616 |
| 617 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 617 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 618 registry->RegisterIntegerPref( | 618 registry->RegisterIntegerPref( |
| 619 GetPingDelayPrefName().c_str(), | 619 GetPingDelayPrefName().c_str(), |
| 620 0, | 620 0, |
| 621 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 621 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 622 } | 622 } |
| 623 | 623 |
| 624 bool RemoveSentinel() { | |
| 625 base::FilePath first_run_sentinel; | |
| 626 return internal::GetFirstRunSentinelFilePath(&first_run_sentinel) && | |
| 627 base::DeleteFile(first_run_sentinel, false); | |
| 628 } | |
| 629 | |
| 630 bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { | 624 bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { |
| 631 PrefService* local_state = g_browser_process->local_state(); | 625 PrefService* local_state = g_browser_process->local_state(); |
| 632 if (!local_state) | 626 if (!local_state) |
| 633 return false; | 627 return false; |
| 634 if (local_state->GetInteger( | 628 if (local_state->GetInteger( |
| 635 prefs::kShowFirstRunBubbleOption) != FIRST_RUN_BUBBLE_SUPPRESS) { | 629 prefs::kShowFirstRunBubbleOption) != FIRST_RUN_BUBBLE_SUPPRESS) { |
| 636 // Set the new state as long as the bubble wasn't explicitly suppressed | 630 // Set the new state as long as the bubble wasn't explicitly suppressed |
| 637 // already. | 631 // already. |
| 638 local_state->SetInteger(prefs::kShowFirstRunBubbleOption, | 632 local_state->SetInteger(prefs::kShowFirstRunBubbleOption, |
| 639 show_bubble_option); | 633 show_bubble_option); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 SetShouldDoPersonalDataManagerFirstRun(); | 800 SetShouldDoPersonalDataManagerFirstRun(); |
| 807 | 801 |
| 808 internal::DoPostImportPlatformSpecificTasks(profile); | 802 internal::DoPostImportPlatformSpecificTasks(profile); |
| 809 } | 803 } |
| 810 | 804 |
| 811 uint16 auto_import_state() { | 805 uint16 auto_import_state() { |
| 812 return g_auto_import_state; | 806 return g_auto_import_state; |
| 813 } | 807 } |
| 814 | 808 |
| 815 } // namespace first_run | 809 } // namespace first_run |
| OLD | NEW |