OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/task_management/providers/web_contents/web_contents_tas
k_provider.h" | 5 #include "chrome/browser/task_management/providers/web_contents/web_contents_tas
k_provider.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "chrome/browser/task_management/providers/web_contents/subframe_task.h" | 9 #include "chrome/browser/task_management/providers/web_contents/subframe_task.h" |
10 #include "chrome/browser/task_management/providers/web_contents/web_contents_tag
s_manager.h" | 10 #include "chrome/browser/task_management/providers/web_contents/web_contents_tag
s_manager.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Listening to WebContentsObserver::TitleWasSet() only is not enough in | 168 // Listening to WebContentsObserver::TitleWasSet() only is not enough in |
169 // some cases when the the webpage doesn't have a title. That's why we update | 169 // some cases when the the webpage doesn't have a title. That's why we update |
170 // the title here as well. | 170 // the title here as well. |
171 itr->second->UpdateTitle(); | 171 itr->second->UpdateTitle(); |
172 | 172 |
173 // Call RendererTask::UpdateFavicon() to set the current favicon to the | 173 // Call RendererTask::UpdateFavicon() to set the current favicon to the |
174 // default favicon. If the page has a non-default favicon, | 174 // default favicon. If the page has a non-default favicon, |
175 // RendererTask::OnFaviconUpdated() will update the current favicon once | 175 // RendererTask::OnFaviconUpdated() will update the current favicon once |
176 // FaviconDriver figures out the correct favicon for the page. | 176 // FaviconDriver figures out the correct favicon for the page. |
177 itr->second->UpdateFavicon(); | 177 itr->second->UpdateFavicon(); |
| 178 itr->second->UpdateRapporSampleName(); |
178 } | 179 } |
179 | 180 |
180 void WebContentsEntry::TitleWasSet(content::NavigationEntry* entry, | 181 void WebContentsEntry::TitleWasSet(content::NavigationEntry* entry, |
181 bool explicit_set) { | 182 bool explicit_set) { |
182 auto itr = tasks_by_frames_.find(web_contents()->GetMainFrame()); | 183 auto itr = tasks_by_frames_.find(web_contents()->GetMainFrame()); |
183 if (itr == tasks_by_frames_.end()) { | 184 if (itr == tasks_by_frames_.end()) { |
184 // TODO(afakhry): Validate whether this actually happens in practice. | 185 // TODO(afakhry): Validate whether this actually happens in practice. |
185 NOTREACHED(); | 186 NOTREACHED(); |
186 return; | 187 return; |
187 } | 188 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 | 376 |
376 WebContentsEntry* entry = itr->second; | 377 WebContentsEntry* entry = itr->second; |
377 entries_map_.erase(itr); | 378 entries_map_.erase(itr); |
378 | 379 |
379 // The entry we're about to delete is our caller, however its' still fine to | 380 // The entry we're about to delete is our caller, however its' still fine to |
380 // delete it. | 381 // delete it. |
381 delete entry; | 382 delete entry; |
382 } | 383 } |
383 | 384 |
384 } // namespace task_management | 385 } // namespace task_management |
OLD | NEW |