OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/navigation_entry_impl.h" | 5 #include "content/browser/frame_host/navigation_entry_impl.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 NavigationEntry* NavigationEntry::Create() { | 45 NavigationEntry* NavigationEntry::Create() { |
46 return new NavigationEntryImpl(); | 46 return new NavigationEntryImpl(); |
47 } | 47 } |
48 | 48 |
49 NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( | 49 NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( |
50 NavigationEntry* entry) { | 50 NavigationEntry* entry) { |
51 return static_cast<NavigationEntryImpl*>(entry); | 51 return static_cast<NavigationEntryImpl*>(entry); |
52 } | 52 } |
53 | 53 |
| 54 const NavigationEntryImpl* NavigationEntryImpl::FromNavigationEntry( |
| 55 const NavigationEntry* entry) { |
| 56 return static_cast<const NavigationEntryImpl*>(entry); |
| 57 } |
| 58 |
54 NavigationEntryImpl::NavigationEntryImpl() | 59 NavigationEntryImpl::NavigationEntryImpl() |
55 : NavigationEntryImpl(nullptr, -1, GURL(), Referrer(), base::string16(), | 60 : NavigationEntryImpl(nullptr, -1, GURL(), Referrer(), base::string16(), |
56 ui::PAGE_TRANSITION_LINK, false) { | 61 ui::PAGE_TRANSITION_LINK, false) { |
57 } | 62 } |
58 | 63 |
59 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, | 64 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, |
60 int page_id, | 65 int page_id, |
61 const GURL& url, | 66 const GURL& url, |
62 const Referrer& referrer, | 67 const Referrer& referrer, |
63 const base::string16& title, | 68 const base::string16& title, |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 screenshot_ = png_data; | 528 screenshot_ = png_data; |
524 if (screenshot_.get()) | 529 if (screenshot_.get()) |
525 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 530 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
526 } | 531 } |
527 | 532 |
528 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { | 533 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { |
529 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); | 534 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); |
530 } | 535 } |
531 | 536 |
532 } // namespace content | 537 } // namespace content |
OLD | NEW |