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

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

Issue 11572036: Do not load extension system in the Profile import process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Handle possible DCHECK/flake in FindBrowserWithWebContents Created 8 years 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
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 <shellapi.h> 7 #include <shellapi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 const CommandLine& cmdline = *CommandLine::ForCurrentProcess(); 325 const CommandLine& cmdline = *CommandLine::ForCurrentProcess();
326 CommandLine import_cmd(cmdline.GetProgram()); 326 CommandLine import_cmd(cmdline.GetProgram());
327 327
328 const char* kSwitchNames[] = { 328 const char* kSwitchNames[] = {
329 switches::kUserDataDir, 329 switches::kUserDataDir,
330 switches::kChromeFrame, 330 switches::kChromeFrame,
331 switches::kCountry, 331 switches::kCountry,
332 }; 332 };
333 import_cmd.CopySwitchesFrom(cmdline, kSwitchNames, arraysize(kSwitchNames)); 333 import_cmd.CopySwitchesFrom(cmdline, kSwitchNames, arraysize(kSwitchNames));
334 334
335 // Allow tests to introduce additional switches.
336 import_cmd.AppendArguments(first_run::GetExtraArgumentsForImportProcess(),
sky 2012/12/18 16:24:02 Instead of this, can you mutate the command line a
tapted 2012/12/19 00:07:53 I haven't yet found a clean way to do that.. The p
sky 2012/12/19 16:14:00 What happens if you add --as-browser to your tests
337 false);
338
335 // Since ImportSettings is called before the local state is stored on disk 339 // Since ImportSettings is called before the local state is stored on disk
336 // we pass the language as an argument. GetApplicationLocale checks the 340 // we pass the language as an argument. GetApplicationLocale checks the
337 // current command line as fallback. 341 // current command line as fallback.
338 import_cmd.AppendSwitchASCII(switches::kLang, 342 import_cmd.AppendSwitchASCII(switches::kLang,
339 g_browser_process->GetApplicationLocale()); 343 g_browser_process->GetApplicationLocale());
340 344
341 if (items_to_import) { 345 if (items_to_import) {
342 import_cmd.AppendSwitchASCII(switches::kImport, 346 import_cmd.AppendSwitchASCII(switches::kImport,
343 EncodeImportParams(importer_type, items_to_import, skip_first_run_ui)); 347 EncodeImportParams(importer_type, items_to_import, skip_first_run_ui));
344 } 348 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 507
504 FilePath MasterPrefsPath() { 508 FilePath MasterPrefsPath() {
505 // The standard location of the master prefs is next to the chrome binary. 509 // The standard location of the master prefs is next to the chrome binary.
506 FilePath master_prefs; 510 FilePath master_prefs;
507 if (!PathService::Get(base::DIR_EXE, &master_prefs)) 511 if (!PathService::Get(base::DIR_EXE, &master_prefs))
508 return FilePath(); 512 return FilePath();
509 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); 513 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
510 } 514 }
511 515
512 } // namespace first_run 516 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_browsertest.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698