| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 DoDelayedInstallExtensions(); | 168 DoDelayedInstallExtensions(); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 base::FilePath GetDefaultPrefFilePath(bool create_profile_dir, | 172 base::FilePath GetDefaultPrefFilePath(bool create_profile_dir, |
| 173 const base::FilePath& user_data_dir) { | 173 const base::FilePath& user_data_dir) { |
| 174 base::FilePath default_pref_dir = | 174 base::FilePath default_pref_dir = |
| 175 profiles::GetDefaultProfileDir(user_data_dir); | 175 profiles::GetDefaultProfileDir(user_data_dir); |
| 176 if (create_profile_dir) { | 176 if (create_profile_dir) { |
| 177 if (!base::PathExists(default_pref_dir)) { | 177 if (!base::PathExists(default_pref_dir)) { |
| 178 if (!file_util::CreateDirectory(default_pref_dir)) | 178 if (!base::CreateDirectory(default_pref_dir)) |
| 179 return base::FilePath(); | 179 return base::FilePath(); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 return profiles::GetProfilePrefsPath(default_pref_dir); | 182 return profiles::GetProfilePrefsPath(default_pref_dir); |
| 183 } | 183 } |
| 184 | 184 |
| 185 // Sets the |items| bitfield according to whether the import data specified by | 185 // Sets the |items| bitfield according to whether the import data specified by |
| 186 // |import_type| should be be auto imported or not. | 186 // |import_type| should be be auto imported or not. |
| 187 void SetImportItem(PrefService* user_prefs, | 187 void SetImportItem(PrefService* user_prefs, |
| 188 const char* pref_path, | 188 const char* pref_path, |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 SetShouldDoPersonalDataManagerFirstRun(); | 824 SetShouldDoPersonalDataManagerFirstRun(); |
| 825 | 825 |
| 826 internal::DoPostImportPlatformSpecificTasks(profile); | 826 internal::DoPostImportPlatformSpecificTasks(profile); |
| 827 } | 827 } |
| 828 | 828 |
| 829 uint16 auto_import_state() { | 829 uint16 auto_import_state() { |
| 830 return g_auto_import_state; | 830 return g_auto_import_state; |
| 831 } | 831 } |
| 832 | 832 |
| 833 } // namespace first_run | 833 } // namespace first_run |
| OLD | NEW |