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 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 432 |
433 // Reset the preference and notifications to avoid showing the bubble again. | 433 // Reset the preference and notifications to avoid showing the bubble again. |
434 prefs->SetInteger(prefs::kShowFirstRunBubbleOption, | 434 prefs->SetInteger(prefs::kShowFirstRunBubbleOption, |
435 first_run::FIRST_RUN_BUBBLE_DONT_SHOW); | 435 first_run::FIRST_RUN_BUBBLE_DONT_SHOW); |
436 | 436 |
437 // Show the bubble now and destroy this bubble launcher. | 437 // Show the bubble now and destroy this bubble launcher. |
438 browser->ShowFirstRunBubble(); | 438 browser->ShowFirstRunBubble(); |
439 delete this; | 439 delete this; |
440 } | 440 } |
441 | 441 |
442 static base::LazyInstance<base::FilePath> master_prefs_path_for_testing | 442 static base::LazyInstance<base::FilePath>::DestructorAtExit |
443 = LAZY_INSTANCE_INITIALIZER; | 443 master_prefs_path_for_testing = LAZY_INSTANCE_INITIALIZER; |
444 | 444 |
445 // Loads master preferences from the master preference file into the installer | 445 // Loads master preferences from the master preference file into the installer |
446 // master preferences. Returns the pointer to installer::MasterPreferences | 446 // master preferences. Returns the pointer to installer::MasterPreferences |
447 // object if successful; otherwise, returns NULL. | 447 // object if successful; otherwise, returns NULL. |
448 installer::MasterPreferences* LoadMasterPrefs() { | 448 installer::MasterPreferences* LoadMasterPrefs() { |
449 base::FilePath master_prefs_path; | 449 base::FilePath master_prefs_path; |
450 if (!master_prefs_path_for_testing.Get().empty()) { | 450 if (!master_prefs_path_for_testing.Get().empty()) { |
451 master_prefs_path = master_prefs_path_for_testing.Get(); | 451 master_prefs_path = master_prefs_path_for_testing.Get(); |
452 } else { | 452 } else { |
453 master_prefs_path = base::FilePath(first_run::internal::MasterPrefsPath()); | 453 master_prefs_path = base::FilePath(first_run::internal::MasterPrefsPath()); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 SetShouldDoPersonalDataManagerFirstRun(); | 850 SetShouldDoPersonalDataManagerFirstRun(); |
851 | 851 |
852 internal::DoPostImportPlatformSpecificTasks(profile); | 852 internal::DoPostImportPlatformSpecificTasks(profile); |
853 } | 853 } |
854 | 854 |
855 uint16_t auto_import_state() { | 855 uint16_t auto_import_state() { |
856 return g_auto_import_state; | 856 return g_auto_import_state; |
857 } | 857 } |
858 | 858 |
859 } // namespace first_run | 859 } // namespace first_run |
OLD | NEW |