| 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 <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 Loading... |
| 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 |
| OLD | NEW |