| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // them. | 56 // them. |
| 57 import_cmd.CommandLine::AppendSwitch(switches::kDisableBackgroundNetworking); | 57 import_cmd.CommandLine::AppendSwitch(switches::kDisableBackgroundNetworking); |
| 58 | 58 |
| 59 // Time to launch the process that is going to do the import. We'll wait | 59 // Time to launch the process that is going to do the import. We'll wait |
| 60 // for the process to return. | 60 // for the process to return. |
| 61 base::LaunchOptions options; | 61 base::LaunchOptions options; |
| 62 options.wait = true; | 62 options.wait = true; |
| 63 return base::LaunchProcess(import_cmd, options, NULL); | 63 return base::LaunchProcess(import_cmd, options, NULL); |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace internal | |
| 67 } // namespace first_run | |
| 68 | |
| 69 namespace first_run { | |
| 70 | |
| 71 base::FilePath MasterPrefsPath() { | 66 base::FilePath MasterPrefsPath() { |
| 72 // The standard location of the master prefs is next to the chrome binary. | 67 // The standard location of the master prefs is next to the chrome binary. |
| 73 base::FilePath master_prefs; | 68 base::FilePath master_prefs; |
| 74 if (!PathService::Get(base::DIR_EXE, &master_prefs)) | 69 if (!PathService::Get(base::DIR_EXE, &master_prefs)) |
| 75 return base::FilePath(); | 70 return base::FilePath(); |
| 76 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); | 71 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); |
| 77 } | 72 } |
| 78 | 73 |
| 74 } // namespace internal |
| 79 } // namespace first_run | 75 } // namespace first_run |
| OLD | NEW |