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

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

Issue 1093923003: Change FrameTreeNode id from int64 to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change FrameTreeNode id from int64 to int 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 "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/common/navigation_params.h" 10 #include "content/common/navigation_params.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 set_should_clear_history_list(false); 454 set_should_clear_history_list(false);
455 set_frame_tree_node_id(-1); 455 set_frame_tree_node_id(-1);
456 456
457 #if defined(OS_ANDROID) 457 #if defined(OS_ANDROID)
458 // Reset the time stamp so that the metrics are not reported if this entry is 458 // Reset the time stamp so that the metrics are not reported if this entry is
459 // loaded again in the future. 459 // loaded again in the future.
460 set_intent_received_timestamp(base::TimeTicks()); 460 set_intent_received_timestamp(base::TimeTicks());
461 #endif 461 #endif
462 } 462 }
463 463
464 void NavigationEntryImpl::AddOrUpdateFrameEntry(int64 frame_tree_node_id, 464 void NavigationEntryImpl::AddOrUpdateFrameEntry(int frame_tree_node_id,
465 SiteInstanceImpl* site_instance, 465 SiteInstanceImpl* site_instance,
466 const GURL& url, 466 const GURL& url,
467 const Referrer& referrer) { 467 const Referrer& referrer) {
468 // TODO(creis): Walk tree to find the node to update. 468 // TODO(creis): Walk tree to find the node to update.
469 // TODO(creis): Only create a new entry if one doesn't exist yet. 469 // TODO(creis): Only create a new entry if one doesn't exist yet.
470 FrameNavigationEntry* frame_entry = 470 FrameNavigationEntry* frame_entry =
471 new FrameNavigationEntry(site_instance, url, referrer); 471 new FrameNavigationEntry(site_instance, url, referrer);
472 root_node()->children.push_back( 472 root_node()->children.push_back(
473 new NavigationEntryImpl::TreeNode(frame_entry)); 473 new NavigationEntryImpl::TreeNode(frame_entry));
474 } 474 }
475 475
476 void NavigationEntryImpl::SetScreenshotPNGData( 476 void NavigationEntryImpl::SetScreenshotPNGData(
477 scoped_refptr<base::RefCountedBytes> png_data) { 477 scoped_refptr<base::RefCountedBytes> png_data) {
478 screenshot_ = png_data; 478 screenshot_ = png_data;
479 if (screenshot_.get()) 479 if (screenshot_.get())
480 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); 480 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size());
481 } 481 }
482 482
483 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { 483 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const {
484 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); 484 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL();
485 } 485 }
486 486
487 } // namespace content 487 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698