Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 1139823006: Ensure that unique ids are unique. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with fix Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698