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 <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #include "content/public/browser/child_process_security_policy.h" | 63 #include "content/public/browser/child_process_security_policy.h" |
64 #include "grit/locale_settings.h" | 64 #include "grit/locale_settings.h" |
65 #include "net/base/net_util.h" | 65 #include "net/base/net_util.h" |
66 #include "ui/base/l10n/l10n_util.h" | 66 #include "ui/base/l10n/l10n_util.h" |
67 #include "ui/base/resource/resource_bundle.h" | 67 #include "ui/base/resource/resource_bundle.h" |
68 | 68 |
69 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
70 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" | 70 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" |
71 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 71 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
72 #include "chrome/browser/chromeos/login/user_manager.h" | 72 #include "chrome/browser/chromeos/login/user_manager.h" |
73 #include "chrome/browser/chromeos/profile_startup.h" | 73 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
74 #include "chromeos/chromeos_switches.h" | 74 #include "chromeos/chromeos_switches.h" |
75 #endif | 75 #endif |
76 | 76 |
77 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) | 77 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) |
78 #include "ui/base/touch/touch_factory_x11.h" | 78 #include "ui/base/touch/touch_factory_x11.h" |
79 #endif | 79 #endif |
80 | 80 |
81 #if defined(OS_WIN) | 81 #if defined(OS_WIN) |
82 #include "chrome/browser/automation/chrome_frame_automation_provider_win.h" | 82 #include "chrome/browser/automation/chrome_frame_automation_provider_win.h" |
83 #include "chrome/browser/ui/startup/startup_browser_creator_win.h" | 83 #include "chrome/browser/ui/startup/startup_browser_creator_win.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 if (!launched) { | 276 if (!launched) { |
277 LOG(ERROR) << "launch error"; | 277 LOG(ERROR) << "launch error"; |
278 if (return_code) | 278 if (return_code) |
279 *return_code = chrome::RESULT_CODE_INVALID_CMDLINE_URL; | 279 *return_code = chrome::RESULT_CODE_INVALID_CMDLINE_URL; |
280 return false; | 280 return false; |
281 } | 281 } |
282 profile_launch_observer.Get().AddLaunched(profile); | 282 profile_launch_observer.Get().AddLaunched(profile); |
283 | 283 |
284 #if defined(OS_CHROMEOS) | 284 #if defined(OS_CHROMEOS) |
285 chromeos::ProfileStartup(profile, process_startup); | 285 chromeos::ProfileHelper::ProfileStartup(profile, process_startup); |
286 #endif | 286 #endif |
287 return true; | 287 return true; |
288 } | 288 } |
289 | 289 |
290 // static | 290 // static |
291 bool StartupBrowserCreator::WasRestarted() { | 291 bool StartupBrowserCreator::WasRestarted() { |
292 // Stores the value of the preference kWasRestarted had when it was read. | 292 // Stores the value of the preference kWasRestarted had when it was read. |
293 static bool was_restarted = false; | 293 static bool was_restarted = false; |
294 | 294 |
295 if (!was_restarted_read_) { | 295 if (!was_restarted_read_) { |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 | 721 |
722 // static | 722 // static |
723 bool StartupBrowserCreator::ActivatedProfile() { | 723 bool StartupBrowserCreator::ActivatedProfile() { |
724 return profile_launch_observer.Get().activated_profile(); | 724 return profile_launch_observer.Get().activated_profile(); |
725 } | 725 } |
726 | 726 |
727 bool HasPendingUncleanExit(Profile* profile) { | 727 bool HasPendingUncleanExit(Profile* profile) { |
728 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && | 728 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && |
729 !profile_launch_observer.Get().HasBeenLaunched(profile); | 729 !profile_launch_observer.Get().HasBeenLaunched(profile); |
730 } | 730 } |
OLD | NEW |