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

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

Issue 438733002: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=283728 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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/public/common/content_constants.h" 10 #include "content/public/common/content_constants.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 transition_type_(PAGE_TRANSITION_LINK), 46 transition_type_(PAGE_TRANSITION_LINK),
47 has_post_data_(false), 47 has_post_data_(false),
48 post_id_(-1), 48 post_id_(-1),
49 restore_type_(RESTORE_NONE), 49 restore_type_(RESTORE_NONE),
50 is_overriding_user_agent_(false), 50 is_overriding_user_agent_(false),
51 http_status_code_(0), 51 http_status_code_(0),
52 is_renderer_initiated_(false), 52 is_renderer_initiated_(false),
53 should_replace_entry_(false), 53 should_replace_entry_(false),
54 should_clear_history_list_(false), 54 should_clear_history_list_(false),
55 can_load_local_resources_(false), 55 can_load_local_resources_(false),
56 xss_detected_(false),
57 frame_tree_node_id_(-1) { 56 frame_tree_node_id_(-1) {
58 } 57 }
59 58
60 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, 59 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance,
61 int page_id, 60 int page_id,
62 const GURL& url, 61 const GURL& url,
63 const Referrer& referrer, 62 const Referrer& referrer,
64 const base::string16& title, 63 const base::string16& title,
65 PageTransition transition_type, 64 PageTransition transition_type,
66 bool is_renderer_initiated) 65 bool is_renderer_initiated)
67 : unique_id_(GetUniqueIDInConstructor()), 66 : unique_id_(GetUniqueIDInConstructor()),
68 site_instance_(instance), 67 site_instance_(instance),
69 bindings_(kInvalidBindings), 68 bindings_(kInvalidBindings),
70 page_type_(PAGE_TYPE_NORMAL), 69 page_type_(PAGE_TYPE_NORMAL),
71 url_(url), 70 url_(url),
72 referrer_(referrer), 71 referrer_(referrer),
73 update_virtual_url_with_url_(false), 72 update_virtual_url_with_url_(false),
74 title_(title), 73 title_(title),
75 page_id_(page_id), 74 page_id_(page_id),
76 transition_type_(transition_type), 75 transition_type_(transition_type),
77 has_post_data_(false), 76 has_post_data_(false),
78 post_id_(-1), 77 post_id_(-1),
79 restore_type_(RESTORE_NONE), 78 restore_type_(RESTORE_NONE),
80 is_overriding_user_agent_(false), 79 is_overriding_user_agent_(false),
81 http_status_code_(0), 80 http_status_code_(0),
82 is_renderer_initiated_(is_renderer_initiated), 81 is_renderer_initiated_(is_renderer_initiated),
83 should_replace_entry_(false), 82 should_replace_entry_(false),
84 should_clear_history_list_(false), 83 should_clear_history_list_(false),
85 can_load_local_resources_(false), 84 can_load_local_resources_(false),
86 xss_detected_(false),
87 frame_tree_node_id_(-1) { 85 frame_tree_node_id_(-1) {
88 } 86 }
89 87
90 NavigationEntryImpl::~NavigationEntryImpl() { 88 NavigationEntryImpl::~NavigationEntryImpl() {
91 } 89 }
92 90
93 int NavigationEntryImpl::GetUniqueID() const { 91 int NavigationEntryImpl::GetUniqueID() const {
94 return unique_id_; 92 return unique_id_;
95 } 93 }
96 94
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 303 }
306 304
307 void NavigationEntryImpl::SetCanLoadLocalResources(bool allow) { 305 void NavigationEntryImpl::SetCanLoadLocalResources(bool allow) {
308 can_load_local_resources_ = allow; 306 can_load_local_resources_ = allow;
309 } 307 }
310 308
311 bool NavigationEntryImpl::GetCanLoadLocalResources() const { 309 bool NavigationEntryImpl::GetCanLoadLocalResources() const {
312 return can_load_local_resources_; 310 return can_load_local_resources_;
313 } 311 }
314 312
315 bool NavigationEntryImpl::GetXssDetected() const {
316 return xss_detected_;
317 }
318
319 void NavigationEntryImpl::SetFrameToNavigate(const std::string& frame_name) { 313 void NavigationEntryImpl::SetFrameToNavigate(const std::string& frame_name) {
320 frame_to_navigate_ = frame_name; 314 frame_to_navigate_ = frame_name;
321 } 315 }
322 316
323 const std::string& NavigationEntryImpl::GetFrameToNavigate() const { 317 const std::string& NavigationEntryImpl::GetFrameToNavigate() const {
324 return frame_to_navigate_; 318 return frame_to_navigate_;
325 } 319 }
326 320
327 void NavigationEntryImpl::SetExtraData(const std::string& key, 321 void NavigationEntryImpl::SetExtraData(const std::string& key,
328 const base::string16& data) { 322 const base::string16& data) {
(...skipping 27 matching lines...) Expand all
356 } 350 }
357 351
358 void NavigationEntryImpl::SetScreenshotPNGData( 352 void NavigationEntryImpl::SetScreenshotPNGData(
359 scoped_refptr<base::RefCountedBytes> png_data) { 353 scoped_refptr<base::RefCountedBytes> png_data) {
360 screenshot_ = png_data; 354 screenshot_ = png_data;
361 if (screenshot_.get()) 355 if (screenshot_.get())
362 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); 356 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size());
363 } 357 }
364 358
365 } // namespace content 359 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698