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

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 2906103002: Post-cleanup settings reset. (Closed)
Patch Set: Created 3 years, 6 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
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/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 20 matching lines...) Expand all
31 #include "base/win/pe_image.h" 31 #include "base/win/pe_image.h"
32 #include "base/win/registry.h" 32 #include "base/win/registry.h"
33 #include "base/win/win_util.h" 33 #include "base/win/win_util.h"
34 #include "base/win/windows_version.h" 34 #include "base/win/windows_version.h"
35 #include "base/win/wrapped_window_proc.h" 35 #include "base/win/wrapped_window_proc.h"
36 #include "chrome/browser/conflicts/module_database_win.h" 36 #include "chrome/browser/conflicts/module_database_win.h"
37 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" 37 #include "chrome/browser/conflicts/module_event_sink_impl_win.h"
38 #include "chrome/browser/first_run/first_run.h" 38 #include "chrome/browser/first_run/first_run.h"
39 #include "chrome/browser/install_verification/win/install_verification.h" 39 #include "chrome/browser/install_verification/win/install_verification.h"
40 #include "chrome/browser/profiles/profile_shortcut_manager.h" 40 #include "chrome/browser/profiles/profile_shortcut_manager.h"
41 #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h"
42 #include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
41 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_config.h" 43 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_config.h"
42 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_controller.h" 44 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_controller.h"
43 #include "chrome/browser/shell_integration.h" 45 #include "chrome/browser/shell_integration.h"
44 #include "chrome/browser/ui/simple_message_box.h" 46 #include "chrome/browser/ui/simple_message_box.h"
45 #include "chrome/browser/ui/uninstall_browser_prompt.h" 47 #include "chrome/browser/ui/uninstall_browser_prompt.h"
46 #include "chrome/browser/win/browser_util.h" 48 #include "chrome/browser/win/browser_util.h"
47 #include "chrome/browser/win/chrome_elf_init.h" 49 #include "chrome/browser/win/chrome_elf_init.h"
48 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" 50 #include "chrome/chrome_watcher/chrome_watcher_main_api.h"
49 #include "chrome/common/chrome_constants.h" 51 #include "chrome/common/chrome_constants.h"
50 #include "chrome/common/chrome_features.h" 52 #include "chrome/common/chrome_features.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 content::BrowserThread::PostAfterStartupTask( 380 content::BrowserThread::PostAfterStartupTask(
379 FROM_HERE, content::BrowserThread::GetBlockingPool(), 381 FROM_HERE, content::BrowserThread::GetBlockingPool(),
380 base::Bind(&VerifyInstallation)); 382 base::Bind(&VerifyInstallation));
381 383
382 InitializeChromeElf(); 384 InitializeChromeElf();
383 385
384 #if defined(GOOGLE_CHROME_BUILD) 386 #if defined(GOOGLE_CHROME_BUILD)
385 did_run_updater_.reset(new DidRunUpdater); 387 did_run_updater_.reset(new DidRunUpdater);
386 #endif 388 #endif
387 389
390 if (base::FeatureList::IsEnabled(safe_browsing::kInBrowserCleanerUIFeature)) {
391 auto done = base::BindOnce([] {});
392 content::BrowserThread::PostAfterStartupTask(
393 FROM_HERE,
394 content::BrowserThread::GetTaskRunnerForThread(
395 content::BrowserThread::UI),
396 base::Bind(&safe_browsing::ResetCurrentProfilePostCleanupIfTagged,
397 base::Passed(&done), nullptr /* use default delegate */));
398 }
399
400 // TODO(ftirelo) Figure out how this should interact with the post-cleanup
401 // reset settings.
388 if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) { 402 if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) {
389 content::BrowserThread::PostAfterStartupTask( 403 content::BrowserThread::PostAfterStartupTask(
390 FROM_HERE, 404 FROM_HERE,
391 content::BrowserThread::GetTaskRunnerForThread( 405 content::BrowserThread::GetTaskRunnerForThread(
392 content::BrowserThread::UI), 406 content::BrowserThread::UI),
393 base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay)); 407 base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay));
394 } 408 }
395 409
396 // Record UMA data about whether the fault-tolerant heap is enabled. 410 // Record UMA data about whether the fault-tolerant heap is enabled.
397 // Use a delayed task to minimize the impact on startup time. 411 // Use a delayed task to minimize the impact on startup time.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (resource_id) 579 if (resource_id)
566 return l10n_util::GetStringUTF16(resource_id); 580 return l10n_util::GetStringUTF16(resource_id);
567 return base::string16(); 581 return base::string16();
568 } 582 }
569 583
570 // static 584 // static
571 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 585 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
572 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 586 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
573 installer::SetTranslationDelegate(&delegate); 587 installer::SetTranslationDelegate(&delegate);
574 } 588 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698