OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
12 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/shell_integration.h" | 16 #include "chrome/browser/shell_integration.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/installer/util/google_update_settings.h" | 18 #include "chrome/installer/util/google_update_settings.h" |
19 #include "chrome/installer/util/master_preferences.h" | 19 #include "chrome/installer/util/master_preferences.h" |
20 #include "content/common/result_codes.h" | 20 #include "content/public/common/result_codes.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 #include "ui/base/ui_base_switches.h" | 22 #include "ui/base/ui_base_switches.h" |
23 | 23 |
24 // TODO(port): This is just a piece of the silent import functionality from | 24 // TODO(port): This is just a piece of the silent import functionality from |
25 // ImportSettings for Windows. It would be nice to get the rest of it ported. | 25 // ImportSettings for Windows. It would be nice to get the rest of it ported. |
26 bool FirstRun::ImportBookmarks(const FilePath& import_bookmarks_path) { | 26 bool FirstRun::ImportBookmarks(const FilePath& import_bookmarks_path) { |
27 const CommandLine& cmdline = *CommandLine::ForCurrentProcess(); | 27 const CommandLine& cmdline = *CommandLine::ForCurrentProcess(); |
28 CommandLine import_cmd(cmdline.GetProgram()); | 28 CommandLine import_cmd(cmdline.GetProgram()); |
29 | 29 |
30 // Propagate user data directory switch. | 30 // Propagate user data directory switch. |
(...skipping 23 matching lines...) Expand all Loading... |
54 } | 54 } |
55 | 55 |
56 // static | 56 // static |
57 FilePath FirstRun::MasterPrefsPath() { | 57 FilePath FirstRun::MasterPrefsPath() { |
58 // The standard location of the master prefs is next to the chrome binary. | 58 // The standard location of the master prefs is next to the chrome binary. |
59 FilePath master_prefs; | 59 FilePath master_prefs; |
60 if (!PathService::Get(base::DIR_EXE, &master_prefs)) | 60 if (!PathService::Get(base::DIR_EXE, &master_prefs)) |
61 return FilePath(); | 61 return FilePath(); |
62 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); | 62 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); |
63 } | 63 } |
OLD | NEW |