Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: chrome/browser/first_run/first_run_linux.cc

Issue 9702103: Clean up first run: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 cmdline.GetSwitchValuePath(switches::kUserDataDir)); 44 cmdline.GetSwitchValuePath(switches::kUserDataDir));
45 } 45 }
46 // Since ImportSettings is called before the local state is stored on disk 46 // Since ImportSettings is called before the local state is stored on disk
47 // we pass the language as an argument. GetApplicationLocale checks the 47 // we pass the language as an argument. GetApplicationLocale checks the
48 // current command line as fallback. 48 // current command line as fallback.
49 import_cmd.AppendSwitchASCII(switches::kLang, 49 import_cmd.AppendSwitchASCII(switches::kLang,
50 g_browser_process->GetApplicationLocale()); 50 g_browser_process->GetApplicationLocale());
51 51
52 import_cmd.CommandLine::AppendSwitchPath(switches::kImportFromFile, 52 import_cmd.CommandLine::AppendSwitchPath(switches::kImportFromFile,
53 import_bookmarks_path); 53 import_bookmarks_path);
54
55 // The importer doesn't need to do any background networking tasks so disable
56 // them.
57 import_cmd.CommandLine::AppendSwitch(switches::kDisableBackgroundNetworking);
58
54 // 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
55 // for the process to return. 60 // for the process to return.
56 base::LaunchOptions options; 61 base::LaunchOptions options;
57 options.wait = true; 62 options.wait = true;
58 return base::LaunchProcess(import_cmd, options, NULL); 63 return base::LaunchProcess(import_cmd, options, NULL);
59 } 64 }
60 65
61 } // namespace internal 66 } // namespace internal
62 } // namespace first_run 67 } // namespace first_run
63 68
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 100
96 FilePath MasterPrefsPath() { 101 FilePath MasterPrefsPath() {
97 // The standard location of the master prefs is next to the chrome binary. 102 // The standard location of the master prefs is next to the chrome binary.
98 FilePath master_prefs; 103 FilePath master_prefs;
99 if (!PathService::Get(base::DIR_EXE, &master_prefs)) 104 if (!PathService::Get(base::DIR_EXE, &master_prefs))
100 return FilePath(); 105 return FilePath();
101 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); 106 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
102 } 107 }
103 108
104 } // namespace first_run 109 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_browser_process.cc ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698