| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 content::NotificationRegistrar registrar_; | 147 content::NotificationRegistrar registrar_; |
| 148 | 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(ProfileLaunchObserver); | 149 DISALLOW_COPY_AND_ASSIGN(ProfileLaunchObserver); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 base::LazyInstance<ProfileLaunchObserver> profile_launch_observer = | 152 base::LazyInstance<ProfileLaunchObserver> profile_launch_observer = |
| 153 LAZY_INSTANCE_INITIALIZER; | 153 LAZY_INSTANCE_INITIALIZER; |
| 154 | 154 |
| 155 } // namespace | 155 } // namespace |
| 156 | 156 |
| 157 StartupBrowserCreator::StartupBrowserCreator() {} | 157 StartupBrowserCreator::StartupBrowserCreator() |
| 158 : suppressed_set_as_default_dialog_(false) { |
| 159 } |
| 158 | 160 |
| 159 StartupBrowserCreator::~StartupBrowserCreator() {} | 161 StartupBrowserCreator::~StartupBrowserCreator() {} |
| 160 | 162 |
| 161 // static | 163 // static |
| 162 bool StartupBrowserCreator::was_restarted_read_ = false; | 164 bool StartupBrowserCreator::was_restarted_read_ = false; |
| 163 | 165 |
| 164 void StartupBrowserCreator::AddFirstRunTab(const GURL& url) { | 166 void StartupBrowserCreator::AddFirstRunTab(const GURL& url) { |
| 165 first_run_tabs_.push_back(url); | 167 first_run_tabs_.push_back(url); |
| 166 } | 168 } |
| 167 | 169 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 NOTREACHED(); | 557 NOTREACHED(); |
| 556 return; | 558 return; |
| 557 } | 559 } |
| 558 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); | 560 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); |
| 559 } | 561 } |
| 560 | 562 |
| 561 bool HasPendingUncleanExit(Profile* profile) { | 563 bool HasPendingUncleanExit(Profile* profile) { |
| 562 return !profile->DidLastSessionExitCleanly() && | 564 return !profile->DidLastSessionExitCleanly() && |
| 563 !profile_launch_observer.Get().HasBeenLaunched(profile); | 565 !profile_launch_observer.Get().HasBeenLaunched(profile); |
| 564 } | 566 } |
| OLD | NEW |