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

Side by Side Diff: chrome/browser/chromeos/boot_times_recorder.cc

Issue 1644773003: Remove BrowserIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-desktop-1
Patch Set: . Created 4 years, 10 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
OLDNEW
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/chromeos/boot_times_recorder.h" 5 #include "chrome/browser/chromeos/boot_times_recorder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 #include "base/strings/string_util.h" 24 #include "base/strings/string_util.h"
25 #include "base/strings/stringprintf.h" 25 #include "base/strings/stringprintf.h"
26 #include "base/sys_info.h" 26 #include "base/sys_info.h"
27 #include "base/thread_task_runner_handle.h" 27 #include "base/thread_task_runner_handle.h"
28 #include "base/threading/thread.h" 28 #include "base/threading/thread.h"
29 #include "base/threading/thread_restrictions.h" 29 #include "base/threading/thread_restrictions.h"
30 #include "base/time/time.h" 30 #include "base/time/time.h"
31 #include "chrome/browser/browser_process.h" 31 #include "chrome/browser/browser_process.h"
32 #include "chrome/browser/chrome_notification_types.h" 32 #include "chrome/browser/chrome_notification_types.h"
33 #include "chrome/browser/ui/browser.h" 33 #include "chrome/browser/ui/browser.h"
34 #include "chrome/browser/ui/browser_iterator.h" 34 #include "chrome/browser/ui/browser_list.h"
35 #include "chrome/browser/ui/tabs/tab_strip_model.h" 35 #include "chrome/browser/ui/tabs/tab_strip_model.h"
36 #include "chrome/common/chrome_switches.h" 36 #include "chrome/common/chrome_switches.h"
37 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
38 #include "components/user_manager/user_manager.h" 38 #include "components/user_manager/user_manager.h"
39 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
40 #include "content/public/browser/navigation_controller.h" 40 #include "content/public/browser/navigation_controller.h"
41 #include "content/public/browser/notification_service.h" 41 #include "content/public/browser/notification_service.h"
42 #include "content/public/browser/render_widget_host_view.h" 42 #include "content/public/browser/render_widget_host_view.h"
43 #include "content/public/browser/web_contents.h" 43 #include "content/public/browser/web_contents.h"
44 44
(...skipping 14 matching lines...) Expand all
59 RenderWidgetHostView* render_widget_host_view = 59 RenderWidgetHostView* render_widget_host_view =
60 web_contents->GetRenderWidgetHostView(); 60 web_contents->GetRenderWidgetHostView();
61 if (render_widget_host_view) 61 if (render_widget_host_view)
62 return render_widget_host_view->GetRenderWidgetHost(); 62 return render_widget_host_view->GetRenderWidgetHost();
63 } 63 }
64 return NULL; 64 return NULL;
65 } 65 }
66 66
67 const std::string GetTabUrl(RenderWidgetHost* rwh) { 67 const std::string GetTabUrl(RenderWidgetHost* rwh) {
68 RenderWidgetHostView* rwhv = rwh->GetView(); 68 RenderWidgetHostView* rwhv = rwh->GetView();
69 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 69 for (auto* browser : *BrowserList::GetInstance()) {
70 Browser* browser = *it;
71 for (int i = 0, tab_count = browser->tab_strip_model()->count(); 70 for (int i = 0, tab_count = browser->tab_strip_model()->count();
72 i < tab_count; 71 i < tab_count;
73 ++i) { 72 ++i) {
74 WebContents* tab = browser->tab_strip_model()->GetWebContentsAt(i); 73 WebContents* tab = browser->tab_strip_model()->GetWebContentsAt(i);
75 if (tab->GetRenderWidgetHostView() == rwhv) { 74 if (tab->GetRenderWidgetHostView() == rwhv) {
76 return tab->GetLastCommittedURL().spec(); 75 return tab->GetLastCommittedURL().spec();
77 } 76 }
78 } 77 }
79 } 78 }
80 return std::string(); 79 return std::string();
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 GetRenderWidgetHost(&web_contents->GetController()); 524 GetRenderWidgetHost(&web_contents->GetController());
526 render_widget_hosts_loading_.erase(render_widget_host); 525 render_widget_hosts_loading_.erase(render_widget_host);
527 break; 526 break;
528 } 527 }
529 default: 528 default:
530 break; 529 break;
531 } 530 }
532 } 531 }
533 532
534 } // namespace chromeos 533 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_window_interactive_uitest.cc ('k') | chrome/browser/custom_home_pages_table_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698