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 "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/public/common/content_constants.h" | 10 #include "content/public/common/content_constants.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 | 107 |
108 void NavigationEntryImpl::SetBaseURLForDataURL(const GURL& url) { | 108 void NavigationEntryImpl::SetBaseURLForDataURL(const GURL& url) { |
109 base_url_for_data_url_ = url; | 109 base_url_for_data_url_ = url; |
110 } | 110 } |
111 | 111 |
112 const GURL& NavigationEntryImpl::GetBaseURLForDataURL() const { | 112 const GURL& NavigationEntryImpl::GetBaseURLForDataURL() const { |
113 return base_url_for_data_url_; | 113 return base_url_for_data_url_; |
114 } | 114 } |
115 | 115 |
| 116 void NavigationEntryImpl::SetDataForDataURL( |
| 117 base::RefCountedMemory* data) { |
| 118 data_for_data_url_ = data; |
| 119 } |
| 120 |
| 121 base::RefCountedMemory* NavigationEntryImpl::GetDataForDataURL() const { |
| 122 return data_for_data_url_; |
| 123 } |
| 124 |
116 void NavigationEntryImpl::SetReferrer(const Referrer& referrer) { | 125 void NavigationEntryImpl::SetReferrer(const Referrer& referrer) { |
117 referrer_ = referrer; | 126 referrer_ = referrer; |
118 } | 127 } |
119 | 128 |
120 const Referrer& NavigationEntryImpl::GetReferrer() const { | 129 const Referrer& NavigationEntryImpl::GetReferrer() const { |
121 return referrer_; | 130 return referrer_; |
122 } | 131 } |
123 | 132 |
124 void NavigationEntryImpl::SetVirtualURL(const GURL& url) { | 133 void NavigationEntryImpl::SetVirtualURL(const GURL& url) { |
125 virtual_url_ = (url == url_) ? GURL() : url; | 134 virtual_url_ = (url == url_) ? GURL() : url; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 345 } |
337 | 346 |
338 void NavigationEntryImpl::SetScreenshotPNGData( | 347 void NavigationEntryImpl::SetScreenshotPNGData( |
339 scoped_refptr<base::RefCountedBytes> png_data) { | 348 scoped_refptr<base::RefCountedBytes> png_data) { |
340 screenshot_ = png_data; | 349 screenshot_ = png_data; |
341 if (screenshot_.get()) | 350 if (screenshot_.get()) |
342 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 351 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
343 } | 352 } |
344 | 353 |
345 } // namespace content | 354 } // namespace content |
OLD | NEW |