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

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

Issue 19869003: ChromeOS changes for GetURL refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing failing tests. Created 7 years, 4 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 | « no previous file | chrome/browser/chromeos/dbus/printer_service_provider.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/dbus/printer_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698