Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: chrome/browser/ui/browser_list.cc

Issue 7324001: Revert 89864 - Don't rely on user gestures for deciding when to dismiss infobars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_init.cc ('k') | chrome/browser/ui/cocoa/keystone_infobar.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ~BrowserActivityObserver() {} 48 ~BrowserActivityObserver() {}
49 49
50 private: 50 private:
51 // NotificationObserver implementation. 51 // NotificationObserver implementation.
52 virtual void Observe(NotificationType type, 52 virtual void Observe(NotificationType type,
53 const NotificationSource& source, 53 const NotificationSource& source,
54 const NotificationDetails& details) { 54 const NotificationDetails& details) {
55 DCHECK(type == NotificationType::NAV_ENTRY_COMMITTED); 55 DCHECK(type == NotificationType::NAV_ENTRY_COMMITTED);
56 const content::LoadCommittedDetails& load = 56 const content::LoadCommittedDetails& load =
57 *Details<content::LoadCommittedDetails>(details).ptr(); 57 *Details<content::LoadCommittedDetails>(details).ptr();
58 if (!load.is_navigation_to_different_page()) 58 if (!load.is_main_frame || load.is_auto || load.is_in_page)
59 return; // Don't log for subframes or other trivial types. 59 return; // Don't log for subframes or other trivial types.
60 60
61 LogRenderProcessHostCount(); 61 LogRenderProcessHostCount();
62 LogBrowserTabCount(); 62 LogBrowserTabCount();
63 } 63 }
64 64
65 // Counts the number of active RenderProcessHosts and logs them. 65 // Counts the number of active RenderProcessHosts and logs them.
66 void LogRenderProcessHostCount() const { 66 void LogRenderProcessHostCount() const {
67 int hosts_count = 0; 67 int hosts_count = 0;
68 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); 68 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // If no more TabContents from Browsers, check the BackgroundPrintingManager. 726 // If no more TabContents from Browsers, check the BackgroundPrintingManager.
727 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { 727 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) {
728 cur_ = *bg_printing_iterator_; 728 cur_ = *bg_printing_iterator_;
729 CHECK(cur_); 729 CHECK(cur_);
730 ++bg_printing_iterator_; 730 ++bg_printing_iterator_;
731 return; 731 return;
732 } 732 }
733 // Reached the end - no more TabContents. 733 // Reached the end - no more TabContents.
734 cur_ = NULL; 734 cur_ = NULL;
735 } 735 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_init.cc ('k') | chrome/browser/ui/cocoa/keystone_infobar.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698