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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 2906103002: Post-cleanup settings reset. (Closed)
Patch Set: Rebase 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/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> // For max(). 9 #include <algorithm> // For max().
10 #include <limits> 10 #include <limits>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck 98 #include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
99 #endif 99 #endif
100 100
101 #if defined(OS_MACOSX) 101 #if defined(OS_MACOSX)
102 #include "chrome/browser/web_applications/web_app_mac.h" 102 #include "chrome/browser/web_applications/web_app_mac.h"
103 #endif 103 #endif
104 104
105 #if defined(OS_WIN) 105 #if defined(OS_WIN)
106 #include "base/win/windows_version.h" 106 #include "base/win/windows_version.h"
107 #include "chrome/browser/metrics/jumplist_metrics_win.h" 107 #include "chrome/browser/metrics/jumplist_metrics_win.h"
108 #include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
108 #endif 109 #endif
109 110
110 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 111 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
111 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 112 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
112 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 113 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
113 #include "chrome/browser/printing/print_dialog_cloud.h" 114 #include "chrome/browser/printing/print_dialog_cloud.h"
114 #endif 115 #endif
115 116
116 #if BUILDFLAG(ENABLE_APP_LIST) 117 #if BUILDFLAG(ENABLE_APP_LIST)
117 #include "chrome/browser/ui/app_list/app_list_service.h" 118 #include "chrome/browser/ui/app_list/app_list_service.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 if (!launched) { 376 if (!launched) {
376 LOG(ERROR) << "launch error"; 377 LOG(ERROR) << "launch error";
377 return false; 378 return false;
378 } 379 }
379 } else { 380 } else {
380 in_synchronous_profile_launch_ = false; 381 in_synchronous_profile_launch_ = false;
381 } 382 }
382 383
383 profile_launch_observer.Get().AddLaunched(profile); 384 profile_launch_observer.Get().AddLaunched(profile);
384 385
386 #if defined(OS_WIN)
387 // Reset settings for the current profile if it's tagged to be reset after a
388 // complete run of the Chrome Cleanup tool.
389 // safe_browsing::ResetPostCleanupSettingsIfTagged(
390 // {profile}, base::Bind([] {}), nullptr /* use default delegate */);
alito 2017/06/02 05:32:42 Is this supposed to be uncommented or removed?
ftirelo 2017/06/02 21:20:57 Commented this while debugging the flaky browser t
391 #endif
392
385 #if defined(OS_CHROMEOS) 393 #if defined(OS_CHROMEOS)
386 chromeos::ProfileHelper::Get()->ProfileStartup(profile, process_startup); 394 chromeos::ProfileHelper::Get()->ProfileStartup(profile, process_startup);
387 #endif 395 #endif
388 return true; 396 return true;
389 } 397 }
390 398
391 // static 399 // static
392 bool StartupBrowserCreator::WasRestarted() { 400 bool StartupBrowserCreator::WasRestarted() {
393 // Stores the value of the preference kWasRestarted had when it was read. 401 // Stores the value of the preference kWasRestarted had when it was read.
394 static bool was_restarted = false; 402 static bool was_restarted = false;
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 if (!entry->IsSigninRequired()) { 1025 if (!entry->IsSigninRequired()) {
1018 Profile* profile = profile_manager->GetProfile(entry->GetPath()); 1026 Profile* profile = profile_manager->GetProfile(entry->GetPath());
1019 if (profile) 1027 if (profile)
1020 return profile; 1028 return profile;
1021 } 1029 }
1022 } 1030 }
1023 1031
1024 return nullptr; 1032 return nullptr;
1025 } 1033 }
1026 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 1034 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698