OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/after_startup_task_utils.h" | 5 #include "chrome/browser/after_startup_task_utils.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
10 #include "base/process/process_info.h" | 11 #include "base/process/process_info.h" |
11 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
12 #include "base/synchronization/cancellation_flag.h" | 13 #include "base/synchronization/cancellation_flag.h" |
13 #include "base/task_runner.h" | 14 #include "base/task_runner.h" |
14 #include "base/tracked_objects.h" | 15 #include "base/tracked_objects.h" |
| 16 #include "build/build_config.h" |
15 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_iterator.h" | 18 #include "chrome/browser/ui/browser_iterator.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
19 #include "content/public/browser/render_frame_host.h" | 21 #include "content/public/browser/render_frame_host.h" |
20 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
21 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
22 | 24 |
23 using content::BrowserThread; | 25 using content::BrowserThread; |
24 using content::WebContents; | 26 using content::WebContents; |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 return ::IsBrowserStartupComplete(); | 221 return ::IsBrowserStartupComplete(); |
220 } | 222 } |
221 | 223 |
222 void AfterStartupTaskUtils::UnsafeResetForTesting() { | 224 void AfterStartupTaskUtils::UnsafeResetForTesting() { |
223 DCHECK(g_after_startup_tasks.Get().empty()); | 225 DCHECK(g_after_startup_tasks.Get().empty()); |
224 if (!IsBrowserStartupComplete()) | 226 if (!IsBrowserStartupComplete()) |
225 return; | 227 return; |
226 g_startup_complete_flag.Get().UnsafeResetForTesting(); | 228 g_startup_complete_flag.Get().UnsafeResetForTesting(); |
227 DCHECK(!IsBrowserStartupComplete()); | 229 DCHECK(!IsBrowserStartupComplete()); |
228 } | 230 } |
OLD | NEW |