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/chromeos/boot_times_loader.h" | 5 #include "chrome/browser/chromeos/boot_times_loader.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 const std::string GetTabUrl(RenderWidgetHost* rwh) { | 56 const std::string GetTabUrl(RenderWidgetHost* rwh) { |
57 RenderWidgetHostView* rwhv = rwh->GetView(); | 57 RenderWidgetHostView* rwhv = rwh->GetView(); |
58 for (chrome::BrowserIterator it; !it.done(); it.Next()) { | 58 for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
59 Browser* browser = *it; | 59 Browser* browser = *it; |
60 for (int i = 0, tab_count = browser->tab_strip_model()->count(); | 60 for (int i = 0, tab_count = browser->tab_strip_model()->count(); |
61 i < tab_count; | 61 i < tab_count; |
62 ++i) { | 62 ++i) { |
63 WebContents* tab = browser->tab_strip_model()->GetWebContentsAt(i); | 63 WebContents* tab = browser->tab_strip_model()->GetWebContentsAt(i); |
64 if (tab->GetRenderWidgetHostView() == rwhv) { | 64 if (tab->GetRenderWidgetHostView() == rwhv) { |
65 return tab->GetURL().spec(); | 65 return tab->GetLastCommittedURL().spec(); |
66 } | 66 } |
67 } | 67 } |
68 } | 68 } |
69 return std::string(); | 69 return std::string(); |
70 } | 70 } |
71 | 71 |
72 void PostCallbackIfNotCanceled( | 72 void PostCallbackIfNotCanceled( |
73 const CancelableTaskTracker::IsCanceledCallback& is_canceled_cb, | 73 const CancelableTaskTracker::IsCanceledCallback& is_canceled_cb, |
74 base::TaskRunner* task_runner, | 74 base::TaskRunner* task_runner, |
75 const chromeos::BootTimesLoader::GetBootTimesCallback& callback, | 75 const chromeos::BootTimesLoader::GetBootTimesCallback& callback, |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 GetRenderWidgetHost(&web_contents->GetController()); | 536 GetRenderWidgetHost(&web_contents->GetController()); |
537 render_widget_hosts_loading_.erase(render_widget_host); | 537 render_widget_hosts_loading_.erase(render_widget_host); |
538 break; | 538 break; |
539 } | 539 } |
540 default: | 540 default: |
541 break; | 541 break; |
542 } | 542 } |
543 } | 543 } |
544 | 544 |
545 } // namespace chromeos | 545 } // namespace chromeos |
OLD | NEW |