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

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

Issue 10806084: 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
40 bool FrameNavigationState::FrameID::operator<( 38 bool FrameNavigationState::FrameID::operator<(
41 const FrameNavigationState::FrameID& other) const { 39 const FrameNavigationState::FrameID& other) const {
42 return frame_num < other.frame_num || 40 return frame_num < other.frame_num ||
43 (frame_num == other.frame_num && 41 (frame_num == other.frame_num &&
44 render_process_id < other.render_process_id); 42 render_process_id < other.render_process_id);
45 } 43 }
46 44
47 bool FrameNavigationState::FrameID::operator==( 45 bool FrameNavigationState::FrameID::operator==(
48 const FrameNavigationState::FrameID& other) const { 46 const FrameNavigationState::FrameID& other) const {
49 return frame_num == other.frame_num && 47 return frame_num == other.frame_num &&
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 185 }
188 186
189 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const { 187 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const {
190 FrameIdToStateMap::const_iterator frame_state = 188 FrameIdToStateMap::const_iterator frame_state =
191 frame_state_map_.find(frame_id); 189 frame_state_map_.find(frame_id);
192 return (frame_state != frame_state_map_.end() && 190 return (frame_state != frame_state_map_.end() &&
193 frame_state->second.is_server_redirected); 191 frame_state->second.is_server_redirected);
194 } 192 }
195 193
196 } // namespace extensions 194 } // 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