| 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/browser_list.h" | 5 #include "chrome/browser/ui/browser_list.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
| 31 #include "content/public/common/result_codes.h" | 31 #include "content/public/common/result_codes.h" |
| 32 | 32 |
| 33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
| 34 #include "chrome/browser/chrome_browser_application_mac.h" | 34 #include "chrome/browser/chrome_browser_application_mac.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
| 38 #include "base/chromeos/chromeos_version.h" | 38 #include "base/chromeos/chromeos_version.h" |
| 39 #include "chrome/browser/chromeos/boot_times_loader.h" | 39 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 40 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 40 #include "chromeos/dbus/dbus_thread_manager.h" |
| 41 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 41 #include "chromeos/dbus/session_manager_client.h" |
| 42 #include "chrome/browser/chromeos/dbus/update_engine_client.h" | 42 #include "chromeos/dbus/update_engine_client.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 using content::WebContents; | 45 using content::WebContents; |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 // This object is instantiated when the first Browser object is added to the | 49 // This object is instantiated when the first Browser object is added to the |
| 50 // list and delete when the last one is removed. It watches for loads and | 50 // list and delete when the last one is removed. It watches for loads and |
| 51 // creates histograms of some global object counts. | 51 // creates histograms of some global object counts. |
| 52 class BrowserActivityObserver : public content::NotificationObserver { | 52 class BrowserActivityObserver : public content::NotificationObserver { |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // If no more TabContents from Browsers, check the BackgroundPrintingManager. | 871 // If no more TabContents from Browsers, check the BackgroundPrintingManager. |
| 872 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { | 872 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { |
| 873 cur_ = *bg_printing_iterator_; | 873 cur_ = *bg_printing_iterator_; |
| 874 CHECK(cur_); | 874 CHECK(cur_); |
| 875 ++bg_printing_iterator_; | 875 ++bg_printing_iterator_; |
| 876 return; | 876 return; |
| 877 } | 877 } |
| 878 // Reached the end - no more TabContents. | 878 // Reached the end - no more TabContents. |
| 879 cur_ = NULL; | 879 cur_ = NULL; |
| 880 } | 880 } |
| OLD | NEW |