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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 extra_data_.erase(key); | 334 extra_data_.erase(key); |
335 } | 335 } |
336 | 336 |
337 NavigationEntryImpl* NavigationEntryImpl::Clone() const { | 337 NavigationEntryImpl* NavigationEntryImpl::Clone() const { |
338 NavigationEntryImpl* copy = new NavigationEntryImpl(); | 338 NavigationEntryImpl* copy = new NavigationEntryImpl(); |
339 | 339 |
340 // TODO(creis): Only share the same FrameNavigationEntries if cloning within | 340 // TODO(creis): Only share the same FrameNavigationEntries if cloning within |
341 // the same tab. | 341 // the same tab. |
342 copy->frame_tree_.reset(frame_tree_->Clone()); | 342 copy->frame_tree_.reset(frame_tree_->Clone()); |
343 | 343 |
344 // Copy all state over, unless cleared in ResetForCommit. | 344 // Copy all state over, unless cleared in ResetForCommit. |
Peter Kasting
2015/05/18 20:49:23
Nit: all -> most
Avi (use Gerrit)
2015/05/18 20:51:43
Done.
| |
345 copy->unique_id_ = unique_id_; | 345 // Not unique_id_; even identical twins have different fingerprints. |
Peter Kasting
2015/05/18 20:49:23
Nit: Perhaps "Don't copy |unique_id_|, or it won't
Avi (use Gerrit)
2015/05/18 20:51:43
Done.
| |
346 copy->bindings_ = bindings_; | 346 copy->bindings_ = bindings_; |
347 copy->page_type_ = page_type_; | 347 copy->page_type_ = page_type_; |
348 copy->virtual_url_ = virtual_url_; | 348 copy->virtual_url_ = virtual_url_; |
349 copy->update_virtual_url_with_url_ = update_virtual_url_with_url_; | 349 copy->update_virtual_url_with_url_ = update_virtual_url_with_url_; |
350 copy->title_ = title_; | 350 copy->title_ = title_; |
351 copy->favicon_ = favicon_; | 351 copy->favicon_ = favicon_; |
352 copy->page_state_ = page_state_; | 352 copy->page_state_ = page_state_; |
353 copy->page_id_ = page_id_; | 353 copy->page_id_ = page_id_; |
354 copy->ssl_ = ssl_; | 354 copy->ssl_ = ssl_; |
355 copy->transition_type_ = transition_type_; | 355 copy->transition_type_ = transition_type_; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 screenshot_ = png_data; | 523 screenshot_ = png_data; |
524 if (screenshot_.get()) | 524 if (screenshot_.get()) |
525 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 525 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
526 } | 526 } |
527 | 527 |
528 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { | 528 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { |
529 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); | 529 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); |
530 } | 530 } |
531 | 531 |
532 } // namespace content | 532 } // namespace content |
OLD | NEW |