| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return page_id_; | 155 return page_id_; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void NavigationEntryImpl::set_site_instance(SiteInstanceImpl* site_instance) { | 158 void NavigationEntryImpl::set_site_instance(SiteInstanceImpl* site_instance) { |
| 159 site_instance_ = site_instance; | 159 site_instance_ = site_instance; |
| 160 } | 160 } |
| 161 | 161 |
| 162 void NavigationEntryImpl::SetBindings(int bindings) { | 162 void NavigationEntryImpl::SetBindings(int bindings) { |
| 163 // Ensure this is set to a valid value, and that it stays the same once set. | 163 // Ensure this is set to a valid value, and that it stays the same once set. |
| 164 CHECK_NE(bindings, kInvalidBindings); | 164 CHECK_NE(bindings, kInvalidBindings); |
| 165 CHECK(bindings_ == kInvalidBindings || bindings_ == bindings); | 165 //CHECK(bindings_ == kInvalidBindings || bindings_ == bindings); |
| 166 bindings_ = bindings; | 166 bindings_ = bindings; |
| 167 } | 167 } |
| 168 | 168 |
| 169 const base::string16& NavigationEntryImpl::GetTitleForDisplay( | 169 const base::string16& NavigationEntryImpl::GetTitleForDisplay( |
| 170 const std::string& languages) const { | 170 const std::string& languages) const { |
| 171 // Most pages have real titles. Don't even bother caching anything if this is | 171 // Most pages have real titles. Don't even bother caching anything if this is |
| 172 // the case. | 172 // the case. |
| 173 if (!title_.empty()) | 173 if (!title_.empty()) |
| 174 return title_; | 174 return title_; |
| 175 | 175 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 } | 337 } |
| 338 | 338 |
| 339 void NavigationEntryImpl::SetScreenshotPNGData( | 339 void NavigationEntryImpl::SetScreenshotPNGData( |
| 340 scoped_refptr<base::RefCountedBytes> png_data) { | 340 scoped_refptr<base::RefCountedBytes> png_data) { |
| 341 screenshot_ = png_data; | 341 screenshot_ = png_data; |
| 342 if (screenshot_.get()) | 342 if (screenshot_.get()) |
| 343 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 343 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace content | 346 } // namespace content |
| OLD | NEW |