| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 | 296 |
| 297 const std::vector<GURL>& NavigationEntryImpl::GetRedirectChain() const { | 297 const std::vector<GURL>& NavigationEntryImpl::GetRedirectChain() const { |
| 298 return redirect_chain_; | 298 return redirect_chain_; |
| 299 } | 299 } |
| 300 | 300 |
| 301 bool NavigationEntryImpl::IsRestored() const { | 301 bool NavigationEntryImpl::IsRestored() const { |
| 302 return restore_type_ != RESTORE_NONE; | 302 return restore_type_ != RESTORE_NONE; |
| 303 } | 303 } |
| 304 | 304 |
| 305 void NavigationEntryImpl::SetVirtualURLForTransition(const GURL& url) { |
| 306 virtual_url_for_transition = url; |
| 307 } |
| 308 |
| 309 const GURL& NavigationEntryImpl::GetVirtualURLForTransition() const { |
| 310 return virtual_url_for_transition; |
| 311 } |
| 312 |
| 305 void NavigationEntryImpl::SetCanLoadLocalResources(bool allow) { | 313 void NavigationEntryImpl::SetCanLoadLocalResources(bool allow) { |
| 306 can_load_local_resources_ = allow; | 314 can_load_local_resources_ = allow; |
| 307 } | 315 } |
| 308 | 316 |
| 309 bool NavigationEntryImpl::GetCanLoadLocalResources() const { | 317 bool NavigationEntryImpl::GetCanLoadLocalResources() const { |
| 310 return can_load_local_resources_; | 318 return can_load_local_resources_; |
| 311 } | 319 } |
| 312 | 320 |
| 313 void NavigationEntryImpl::SetFrameToNavigate(const std::string& frame_name) { | 321 void NavigationEntryImpl::SetFrameToNavigate(const std::string& frame_name) { |
| 314 frame_to_navigate_ = frame_name; | 322 frame_to_navigate_ = frame_name; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 358 } |
| 351 | 359 |
| 352 void NavigationEntryImpl::SetScreenshotPNGData( | 360 void NavigationEntryImpl::SetScreenshotPNGData( |
| 353 scoped_refptr<base::RefCountedBytes> png_data) { | 361 scoped_refptr<base::RefCountedBytes> png_data) { |
| 354 screenshot_ = png_data; | 362 screenshot_ = png_data; |
| 355 if (screenshot_.get()) | 363 if (screenshot_.get()) |
| 356 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 364 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
| 357 } | 365 } |
| 358 | 366 |
| 359 } // namespace content | 367 } // namespace content |
| OLD | NEW |