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

Side by Side Diff: content/browser/tab_contents/navigation_controller_impl.h

Issue 9565045: Ensure that CopyStateFromAndPrune doesn't exceed kMaxSessionHistoryEntries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comments. Created 8 years, 9 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 | « no previous file | content/browser/tab_contents/navigation_controller_impl.cc » ('j') | 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) 2011 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 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // Removes the entry at |index|, as long as it is not the current entry. 242 // Removes the entry at |index|, as long as it is not the current entry.
243 void RemoveEntryAtIndexInternal(int index); 243 void RemoveEntryAtIndexInternal(int index);
244 244
245 // Discards the pending and transient entries. 245 // Discards the pending and transient entries.
246 void DiscardNonCommittedEntriesInternal(); 246 void DiscardNonCommittedEntriesInternal();
247 247
248 // Discards the transient entry. 248 // Discards the transient entry.
249 void DiscardTransientEntry(); 249 void DiscardTransientEntry();
250 250
251 // If we have the maximum number of entries, remove the oldest one in
252 // preparation to add another.
253 void PruneOldestEntryIfFull();
254
251 // Returns true if the navigation is redirect. 255 // Returns true if the navigation is redirect.
252 bool IsRedirect(const ViewHostMsg_FrameNavigate_Params& params); 256 bool IsRedirect(const ViewHostMsg_FrameNavigate_Params& params);
253 257
254 // Returns true if the navigation is likley to be automatic rather than 258 // Returns true if the navigation is likley to be automatic rather than
255 // user-initiated. 259 // user-initiated.
256 bool IsLikelyAutoNavigation(base::TimeTicks now); 260 bool IsLikelyAutoNavigation(base::TimeTicks now);
257 261
258 // Inserts up to |max_index| entries from |source| into this. This does NOT 262 // Inserts up to |max_index| entries from |source| into this. This does NOT
259 // adjust any of the members that reference entries_ 263 // adjust any of the members that reference entries_
260 // (last_committed_entry_index_, pending_entry_index_ or 264 // (last_committed_entry_index_, pending_entry_index_ or
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 static size_t max_entry_count_for_testing_; 323 static size_t max_entry_count_for_testing_;
320 324
321 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), 325 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE),
322 // NO_RELOAD otherwise. 326 // NO_RELOAD otherwise.
323 ReloadType pending_reload_; 327 ReloadType pending_reload_;
324 328
325 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 329 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
326 }; 330 };
327 331
328 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ 332 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/tab_contents/navigation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698