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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 delete install_prefs; | 454 delete install_prefs; |
455 return NULL; | 455 return NULL; |
456 } | 456 } |
457 | 457 |
458 return install_prefs; | 458 return install_prefs; |
459 } | 459 } |
460 | 460 |
461 // Makes chrome the user's default browser according to policy or | 461 // Makes chrome the user's default browser according to policy or |
462 // |make_chrome_default_for_user| if no policy is set. | 462 // |make_chrome_default_for_user| if no policy is set. |
463 void ProcessDefaultBrowserPolicy(bool make_chrome_default_for_user) { | 463 void ProcessDefaultBrowserPolicy(bool make_chrome_default_for_user) { |
464 // Only proceed if chrome can be made default unattended. The interactive case | 464 // Only proceed if chrome can be made default unattended. In other cases, this |
465 // (Windows 8+) is handled by the first run default browser prompt. | 465 // is handled by the first run default browser prompt (on Windows 8+). |
466 if (shell_integration::CanSetAsDefaultBrowser() == | 466 if (shell_integration::GetDefaultWebClientSetPermission() == |
467 shell_integration::SET_DEFAULT_UNATTENDED) { | 467 shell_integration::SET_DEFAULT_UNATTENDED) { |
468 // The policy has precedence over the user's choice. | 468 // The policy has precedence over the user's choice. |
469 if (g_browser_process->local_state()->IsManagedPreference( | 469 if (g_browser_process->local_state()->IsManagedPreference( |
470 prefs::kDefaultBrowserSettingEnabled)) { | 470 prefs::kDefaultBrowserSettingEnabled)) { |
471 if (g_browser_process->local_state()->GetBoolean( | 471 if (g_browser_process->local_state()->GetBoolean( |
472 prefs::kDefaultBrowserSettingEnabled)) { | 472 prefs::kDefaultBrowserSettingEnabled)) { |
473 shell_integration::SetAsDefaultBrowser(); | 473 shell_integration::SetAsDefaultBrowser(); |
474 } | 474 } |
475 } else if (make_chrome_default_for_user) { | 475 } else if (make_chrome_default_for_user) { |
476 shell_integration::SetAsDefaultBrowser(); | 476 shell_integration::SetAsDefaultBrowser(); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 SetShouldDoPersonalDataManagerFirstRun(); | 821 SetShouldDoPersonalDataManagerFirstRun(); |
822 | 822 |
823 internal::DoPostImportPlatformSpecificTasks(profile); | 823 internal::DoPostImportPlatformSpecificTasks(profile); |
824 } | 824 } |
825 | 825 |
826 uint16_t auto_import_state() { | 826 uint16_t auto_import_state() { |
827 return g_auto_import_state; | 827 return g_auto_import_state; |
828 } | 828 } |
829 | 829 |
830 } // namespace first_run | 830 } // namespace first_run |
OLD | NEW |