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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc

Issue 10818024: Revert 148077 - Remove destructor from FrameNavigationState::FrameID so we can use it as a static (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/frame_navigation_state.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/web_navigation/frame_navigation_state.h" 5 #include "chrome/browser/extensions/api/web_navigation/frame_navigation_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 17 matching lines...) Expand all
28 : frame_num(-1), 28 : frame_num(-1),
29 render_process_id(-1) { 29 render_process_id(-1) {
30 } 30 }
31 31
32 FrameNavigationState::FrameID::FrameID(int64 frame_num, 32 FrameNavigationState::FrameID::FrameID(int64 frame_num,
33 int render_process_id) 33 int render_process_id)
34 : frame_num(frame_num), 34 : frame_num(frame_num),
35 render_process_id(render_process_id) { 35 render_process_id(render_process_id) {
36 } 36 }
37 37
38 FrameNavigationState::FrameID::~FrameID() {}
39
38 bool FrameNavigationState::FrameID::operator<( 40 bool FrameNavigationState::FrameID::operator<(
39 const FrameNavigationState::FrameID& other) const { 41 const FrameNavigationState::FrameID& other) const {
40 return frame_num < other.frame_num || 42 return frame_num < other.frame_num ||
41 (frame_num == other.frame_num && 43 (frame_num == other.frame_num &&
42 render_process_id < other.render_process_id); 44 render_process_id < other.render_process_id);
43 } 45 }
44 46
45 bool FrameNavigationState::FrameID::operator==( 47 bool FrameNavigationState::FrameID::operator==(
46 const FrameNavigationState::FrameID& other) const { 48 const FrameNavigationState::FrameID& other) const {
47 return frame_num == other.frame_num && 49 return frame_num == other.frame_num &&
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 187 }
186 188
187 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const { 189 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const {
188 FrameIdToStateMap::const_iterator frame_state = 190 FrameIdToStateMap::const_iterator frame_state =
189 frame_state_map_.find(frame_id); 191 frame_state_map_.find(frame_id);
190 return (frame_state != frame_state_map_.end() && 192 return (frame_state != frame_state_map_.end() &&
191 frame_state->second.is_server_redirected); 193 frame_state->second.is_server_redirected);
192 } 194 }
193 195
194 } // namespace extensions 196 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/frame_navigation_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698