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

Side by Side Diff: content/common/page_state_serialization.cc

Issue 400923002: Save some gcc footprint (15 KB) in ExplodedFrameState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ExplodedFrameSet - not inlined Created 6 years, 5 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
« no previous file with comments | « content/common/page_state_serialization.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/page_state_serialization.h" 5 #include "content/common/page_state_serialization.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 ExplodedHttpBody::~ExplodedHttpBody() { 689 ExplodedHttpBody::~ExplodedHttpBody() {
690 } 690 }
691 691
692 ExplodedFrameState::ExplodedFrameState() 692 ExplodedFrameState::ExplodedFrameState()
693 : item_sequence_number(0), 693 : item_sequence_number(0),
694 document_sequence_number(0), 694 document_sequence_number(0),
695 page_scale_factor(0.0), 695 page_scale_factor(0.0),
696 referrer_policy(blink::WebReferrerPolicyDefault) { 696 referrer_policy(blink::WebReferrerPolicyDefault) {
697 } 697 }
698 698
699 ExplodedFrameState::ExplodedFrameState(const ExplodedFrameState& other) {
700 assign(other);
701 }
702
699 ExplodedFrameState::~ExplodedFrameState() { 703 ExplodedFrameState::~ExplodedFrameState() {
700 } 704 }
701 705
706 void ExplodedFrameState::operator=(const ExplodedFrameState& other) {
707 if (&other != this)
708 assign(other);
709 }
710
711 void ExplodedFrameState::assign(const ExplodedFrameState& other) {
712 url_string = other.url_string;
713 referrer = other.referrer;
714 target = other.target;
715 state_object = other.state_object;
716 document_state = other.document_state;
717 pinch_viewport_scroll_offset = other.pinch_viewport_scroll_offset;
718 scroll_offset = other.scroll_offset;
719 item_sequence_number = other.item_sequence_number;
720 document_sequence_number = other.document_sequence_number;
721 page_scale_factor = other.page_scale_factor;
722 referrer_policy = other.referrer_policy;
723 http_body = other.http_body;
724 children = other.children;
725 }
726
702 ExplodedPageState::ExplodedPageState() { 727 ExplodedPageState::ExplodedPageState() {
703 } 728 }
704 729
705 ExplodedPageState::~ExplodedPageState() { 730 ExplodedPageState::~ExplodedPageState() {
706 } 731 }
707 732
708 bool DecodePageState(const std::string& encoded, ExplodedPageState* exploded) { 733 bool DecodePageState(const std::string& encoded, ExplodedPageState* exploded) {
709 *exploded = ExplodedPageState(); 734 *exploded = ExplodedPageState();
710 735
711 if (encoded.empty()) 736 if (encoded.empty())
(...skipping 18 matching lines...) Expand all
730 float device_scale_factor, 755 float device_scale_factor,
731 ExplodedPageState* exploded) { 756 ExplodedPageState* exploded) {
732 g_device_scale_factor_for_testing = device_scale_factor; 757 g_device_scale_factor_for_testing = device_scale_factor;
733 bool rv = DecodePageState(encoded, exploded); 758 bool rv = DecodePageState(encoded, exploded);
734 g_device_scale_factor_for_testing = 0.0; 759 g_device_scale_factor_for_testing = 0.0;
735 return rv; 760 return rv;
736 } 761 }
737 #endif 762 #endif
738 763
739 } // namespace content 764 } // namespace content
OLDNEW
« no previous file with comments | « content/common/page_state_serialization.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698