| 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/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 Loading... |
| 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 Loading... |
| 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::PostCleanupSettingsResetter* settings_resetter = |
| 390 safe_browsing::PostCleanupSettingsResetter::Create(); |
| 391 if (settings_resetter) { |
| 392 settings_resetter->ResetTaggedProfiles({profile}, |
| 393 settings_resetter->ReleaseClosure(), |
| 394 nullptr /* use default delegate */); |
| 395 } |
| 396 #endif |
| 397 |
| 385 #if defined(OS_CHROMEOS) | 398 #if defined(OS_CHROMEOS) |
| 386 chromeos::ProfileHelper::Get()->ProfileStartup(profile, process_startup); | 399 chromeos::ProfileHelper::Get()->ProfileStartup(profile, process_startup); |
| 387 #endif | 400 #endif |
| 388 return true; | 401 return true; |
| 389 } | 402 } |
| 390 | 403 |
| 391 // static | 404 // static |
| 392 bool StartupBrowserCreator::WasRestarted() { | 405 bool StartupBrowserCreator::WasRestarted() { |
| 393 // Stores the value of the preference kWasRestarted had when it was read. | 406 // Stores the value of the preference kWasRestarted had when it was read. |
| 394 static bool was_restarted = false; | 407 static bool was_restarted = false; |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 if (!entry->IsSigninRequired()) { | 1030 if (!entry->IsSigninRequired()) { |
| 1018 Profile* profile = profile_manager->GetProfile(entry->GetPath()); | 1031 Profile* profile = profile_manager->GetProfile(entry->GetPath()); |
| 1019 if (profile) | 1032 if (profile) |
| 1020 return profile; | 1033 return profile; |
| 1021 } | 1034 } |
| 1022 } | 1035 } |
| 1023 | 1036 |
| 1024 return nullptr; | 1037 return nullptr; |
| 1025 } | 1038 } |
| 1026 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 1039 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| OLD | NEW |