| 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/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
| 6 | 6 |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "base/win/pe_image.h" | 30 #include "base/win/pe_image.h" |
| 31 #include "base/win/registry.h" | 31 #include "base/win/registry.h" |
| 32 #include "base/win/win_util.h" | 32 #include "base/win/win_util.h" |
| 33 #include "base/win/windows_version.h" | 33 #include "base/win/windows_version.h" |
| 34 #include "base/win/wrapped_window_proc.h" | 34 #include "base/win/wrapped_window_proc.h" |
| 35 #include "chrome/browser/conflicts/module_database_win.h" | 35 #include "chrome/browser/conflicts/module_database_win.h" |
| 36 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" | 36 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" |
| 37 #include "chrome/browser/first_run/first_run.h" | 37 #include "chrome/browser/first_run/first_run.h" |
| 38 #include "chrome/browser/install_verification/win/install_verification.h" | 38 #include "chrome/browser/install_verification/win/install_verification.h" |
| 39 #include "chrome/browser/profiles/profile_shortcut_manager.h" | 39 #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| 40 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom
pt_config.h" |
| 41 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom
pt_controller.h" |
| 40 #include "chrome/browser/shell_integration.h" | 42 #include "chrome/browser/shell_integration.h" |
| 41 #include "chrome/browser/ui/simple_message_box.h" | 43 #include "chrome/browser/ui/simple_message_box.h" |
| 42 #include "chrome/browser/ui/uninstall_browser_prompt.h" | 44 #include "chrome/browser/ui/uninstall_browser_prompt.h" |
| 43 #include "chrome/browser/win/browser_util.h" | 45 #include "chrome/browser/win/browser_util.h" |
| 44 #include "chrome/browser/win/chrome_elf_init.h" | 46 #include "chrome/browser/win/chrome_elf_init.h" |
| 45 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" | 47 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" |
| 46 #include "chrome/common/chrome_constants.h" | 48 #include "chrome/common/chrome_constants.h" |
| 47 #include "chrome/common/chrome_features.h" | 49 #include "chrome/common/chrome_features.h" |
| 48 #include "chrome/common/chrome_paths.h" | 50 #include "chrome/common/chrome_paths.h" |
| 49 #include "chrome/common/chrome_result_codes.h" | 51 #include "chrome/common/chrome_result_codes.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 364 |
| 363 UMA_HISTOGRAM_BOOLEAN("Windows.Tablet", base::win::IsTabletDevice(nullptr)); | 365 UMA_HISTOGRAM_BOOLEAN("Windows.Tablet", base::win::IsTabletDevice(nullptr)); |
| 364 | 366 |
| 365 // Set up a task to verify installed modules in the current process. | 367 // Set up a task to verify installed modules in the current process. |
| 366 content::BrowserThread::PostAfterStartupTask( | 368 content::BrowserThread::PostAfterStartupTask( |
| 367 FROM_HERE, content::BrowserThread::GetBlockingPool(), | 369 FROM_HERE, content::BrowserThread::GetBlockingPool(), |
| 368 base::Bind(&VerifyInstallation)); | 370 base::Bind(&VerifyInstallation)); |
| 369 | 371 |
| 370 InitializeChromeElf(); | 372 InitializeChromeElf(); |
| 371 | 373 |
| 374 if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) { |
| 375 content::BrowserThread::PostAfterStartupTask( |
| 376 FROM_HERE, |
| 377 content::BrowserThread::GetTaskRunnerForThread( |
| 378 content::BrowserThread::UI), |
| 379 base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay)); |
| 380 } |
| 381 |
| 372 // Record UMA data about whether the fault-tolerant heap is enabled. | 382 // Record UMA data about whether the fault-tolerant heap is enabled. |
| 373 // Use a delayed task to minimize the impact on startup time. | 383 // Use a delayed task to minimize the impact on startup time. |
| 374 content::BrowserThread::PostDelayedTask( | 384 content::BrowserThread::PostDelayedTask( |
| 375 content::BrowserThread::UI, | 385 content::BrowserThread::UI, |
| 376 FROM_HERE, | 386 FROM_HERE, |
| 377 base::Bind(&DetectFaultTolerantHeap), | 387 base::Bind(&DetectFaultTolerantHeap), |
| 378 base::TimeDelta::FromMinutes(1)); | 388 base::TimeDelta::FromMinutes(1)); |
| 379 } | 389 } |
| 380 | 390 |
| 381 // static | 391 // static |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 if (resource_id) | 550 if (resource_id) |
| 541 return l10n_util::GetStringUTF16(resource_id); | 551 return l10n_util::GetStringUTF16(resource_id); |
| 542 return base::string16(); | 552 return base::string16(); |
| 543 } | 553 } |
| 544 | 554 |
| 545 // static | 555 // static |
| 546 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 556 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 547 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 557 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 548 installer::SetTranslationDelegate(&delegate); | 558 installer::SetTranslationDelegate(&delegate); |
| 549 } | 559 } |
| OLD | NEW |