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

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

Issue 14328019: Some first_run code cleanups (extracted from https://codereview.chromium.org/12670013 to keep that … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r196136 Created 7 years, 8 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
« no previous file with comments | « chrome/browser/first_run/first_run_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 GoogleUpdateSettings::SetCollectStatsConsent(false); 490 GoogleUpdateSettings::SetCollectStatsConsent(false);
491 } else if (retcode == installer::EULA_ACCEPTED_OPT_IN) { 491 } else if (retcode == installer::EULA_ACCEPTED_OPT_IN) {
492 VLOG(1) << "EULA : collection consent"; 492 VLOG(1) << "EULA : collection consent";
493 GoogleUpdateSettings::SetCollectStatsConsent(true); 493 GoogleUpdateSettings::SetCollectStatsConsent(true);
494 } 494 }
495 } 495 }
496 } 496 }
497 return true; 497 return true;
498 } 498 }
499 499
500 base::FilePath MasterPrefsPath() {
501 // The standard location of the master prefs is next to the chrome binary.
502 base::FilePath master_prefs;
503 if (!PathService::Get(base::DIR_EXE, &master_prefs))
504 return base::FilePath();
505 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
506 }
507
500 } // namespace internal 508 } // namespace internal
501 } // namespace first_run 509 } // namespace first_run
502 510
503 namespace first_run { 511 namespace first_run {
504 512
505 int ImportNow(Profile* profile, const CommandLine& cmdline) { 513 int ImportNow(Profile* profile, const CommandLine& cmdline) {
506 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); 514 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline);
507 #if !defined(USE_AURA) 515 #if !defined(USE_AURA)
508 if (cmdline.HasSwitch(switches::kImport)) { 516 if (cmdline.HasSwitch(switches::kImport)) {
509 return_code = ImportFromBrowser(profile, cmdline); 517 return_code = ImportFromBrowser(profile, cmdline);
510 } 518 }
511 #endif 519 #endif
512 return return_code; 520 return return_code;
513 } 521 }
514 522
515 base::FilePath MasterPrefsPath() {
516 // The standard location of the master prefs is next to the chrome binary.
517 base::FilePath master_prefs;
518 if (!PathService::Get(base::DIR_EXE, &master_prefs))
519 return base::FilePath();
520 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
521 }
522
523 } // namespace first_run 523 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698