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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 } | 327 } |
328 | 328 |
329 bool CopyPrefFile(const base::FilePath& user_data_dir, | 329 bool CopyPrefFile(const base::FilePath& user_data_dir, |
330 const base::FilePath& master_prefs_path) { | 330 const base::FilePath& master_prefs_path) { |
331 base::FilePath user_prefs = GetDefaultPrefFilePath(true, user_data_dir); | 331 base::FilePath user_prefs = GetDefaultPrefFilePath(true, user_data_dir); |
332 if (user_prefs.empty()) | 332 if (user_prefs.empty()) |
333 return false; | 333 return false; |
334 | 334 |
335 // The master prefs are regular prefs so we can just copy the file | 335 // The master prefs are regular prefs so we can just copy the file |
336 // to the default place and they just work. | 336 // to the default place and they just work. |
337 return file_util::CopyFile(master_prefs_path, user_prefs); | 337 return base::CopyFile(master_prefs_path, user_prefs); |
338 } | 338 } |
339 | 339 |
340 void SetupMasterPrefsFromInstallPrefs( | 340 void SetupMasterPrefsFromInstallPrefs( |
341 const installer::MasterPreferences& install_prefs, | 341 const installer::MasterPreferences& install_prefs, |
342 MasterPrefs* out_prefs) { | 342 MasterPrefs* out_prefs) { |
343 ConvertStringVectorToGURLVector( | 343 ConvertStringVectorToGURLVector( |
344 install_prefs.GetFirstRunTabs(), &out_prefs->new_tabs); | 344 install_prefs.GetFirstRunTabs(), &out_prefs->new_tabs); |
345 | 345 |
346 install_prefs.GetInt(installer::master_preferences::kDistroPingDelay, | 346 install_prefs.GetInt(installer::master_preferences::kDistroPingDelay, |
347 &out_prefs->ping_delay); | 347 &out_prefs->ping_delay); |
(...skipping 421 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 |