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

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

Issue 11412248: Removed dead code from chrome/browser/extensions/api/web_navigation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
10 10
(...skipping 19 matching lines...) Expand all
30 render_view_host(NULL) { 30 render_view_host(NULL) {
31 } 31 }
32 32
33 FrameNavigationState::FrameID::FrameID( 33 FrameNavigationState::FrameID::FrameID(
34 int64 frame_num, 34 int64 frame_num,
35 content::RenderViewHost* render_view_host) 35 content::RenderViewHost* render_view_host)
36 : frame_num(frame_num), 36 : frame_num(frame_num),
37 render_view_host(render_view_host) { 37 render_view_host(render_view_host) {
38 } 38 }
39 39
40 bool FrameNavigationState::FrameID::IsValid() const {
41 return frame_num >= 0 && render_view_host;
42 }
43
44 bool FrameNavigationState::FrameID::operator<( 40 bool FrameNavigationState::FrameID::operator<(
45 const FrameNavigationState::FrameID& other) const { 41 const FrameNavigationState::FrameID& other) const {
46 return frame_num < other.frame_num || 42 return frame_num < other.frame_num ||
47 (frame_num == other.frame_num && 43 (frame_num == other.frame_num &&
48 render_view_host < other.render_view_host); 44 render_view_host < other.render_view_host);
49 } 45 }
50 46
51 bool FrameNavigationState::FrameID::operator==( 47 bool FrameNavigationState::FrameID::operator==(
52 const FrameNavigationState::FrameID& other) const { 48 const FrameNavigationState::FrameID& other) const {
53 return frame_num == other.frame_num && 49 return frame_num == other.frame_num &&
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 216 }
221 217
222 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const { 218 bool FrameNavigationState::GetIsServerRedirected(FrameID frame_id) const {
223 FrameIdToStateMap::const_iterator frame_state = 219 FrameIdToStateMap::const_iterator frame_state =
224 frame_state_map_.find(frame_id); 220 frame_state_map_.find(frame_id);
225 return (frame_state != frame_state_map_.end() && 221 return (frame_state != frame_state_map_.end() &&
226 frame_state->second.is_server_redirected); 222 frame_state->second.is_server_redirected);
227 } 223 }
228 224
229 } // namespace extensions 225 } // 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