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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 registry->RegisterIntegerPref( | 495 registry->RegisterIntegerPref( |
496 GetPingDelayPrefName().c_str(), | 496 GetPingDelayPrefName().c_str(), |
497 0, | 497 0, |
498 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 498 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
499 } | 499 } |
500 | 500 |
501 bool RemoveSentinel() { | 501 bool RemoveSentinel() { |
502 base::FilePath first_run_sentinel; | 502 base::FilePath first_run_sentinel; |
503 if (!internal::GetFirstRunSentinelFilePath(&first_run_sentinel)) | 503 if (!internal::GetFirstRunSentinelFilePath(&first_run_sentinel)) |
504 return false; | 504 return false; |
505 return base::Delete(first_run_sentinel, false); | 505 return base::DeleteFile(first_run_sentinel, false); |
506 } | 506 } |
507 | 507 |
508 bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { | 508 bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) { |
509 PrefService* local_state = g_browser_process->local_state(); | 509 PrefService* local_state = g_browser_process->local_state(); |
510 if (!local_state) | 510 if (!local_state) |
511 return false; | 511 return false; |
512 if (local_state->GetInteger( | 512 if (local_state->GetInteger( |
513 prefs::kShowFirstRunBubbleOption) != FIRST_RUN_BUBBLE_SUPPRESS) { | 513 prefs::kShowFirstRunBubbleOption) != FIRST_RUN_BUBBLE_SUPPRESS) { |
514 // Set the new state as long as the bubble wasn't explicitly suppressed | 514 // Set the new state as long as the bubble wasn't explicitly suppressed |
515 // already. | 515 // already. |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 SetShouldDoPersonalDataManagerFirstRun(); | 769 SetShouldDoPersonalDataManagerFirstRun(); |
770 | 770 |
771 internal::DoPostImportPlatformSpecificTasks(profile); | 771 internal::DoPostImportPlatformSpecificTasks(profile); |
772 } | 772 } |
773 | 773 |
774 uint16 auto_import_state() { | 774 uint16 auto_import_state() { |
775 return g_auto_import_state; | 775 return g_auto_import_state; |
776 } | 776 } |
777 | 777 |
778 } // namespace first_run | 778 } // namespace first_run |
OLD | NEW |