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

Side by Side Diff: chrome/browser/tab_contents/navigation_entry.h

Issue 341043: Changes session restore to use a normal load rather than preferring... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // 353 //
354 // The actual post data is stored in the content_state and is extracted by 354 // The actual post data is stored in the content_state and is extracted by
355 // WebKit to actually make the request. 355 // WebKit to actually make the request.
356 void set_has_post_data(bool has_post_data) { 356 void set_has_post_data(bool has_post_data) {
357 has_post_data_ = has_post_data; 357 has_post_data_ = has_post_data;
358 } 358 }
359 bool has_post_data() const { 359 bool has_post_data() const {
360 return has_post_data_; 360 return has_post_data_;
361 } 361 }
362 362
363 // Was this entry created from session/tab restore? If so this is true and 363 // Enumerations of the possible restore types.
364 // gets set to false once we navigate to it. 364 enum RestoreType {
365 // (See NavigationController::DidNavigateToEntry). 365 // The entry has been restored is from the last session.
366 void set_restored(bool restored) { 366 RESTORE_LAST_SESSION,
367 restored_ = restored; 367
368 // The entry has been restored from the current session. This is used when
369 // the user issues 'reopen closed tab'.
370 RESTORE_CURRENT_SESSION,
371
372 // The entry was not restored.
373 RESTORE_NONE
374 };
375
376 // The RestoreType for this entry. This is set if the entry was retored. This
377 // is set to RESTORE_NONE once the entry is loaded.
378 void set_restore_type(RestoreType type) {
379 restore_type_ = type;
368 } 380 }
369 bool restored() const { 381 RestoreType restore_type() const {
370 return restored_; 382 return restore_type_;
371 } 383 }
372 384
373 private: 385 private:
374 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 386 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
375 // Session/Tab restore save portions of this class so that it can be recreated 387 // Session/Tab restore save portions of this class so that it can be recreated
376 // later. If you add a new field that needs to be persisted you'll have to 388 // later. If you add a new field that needs to be persisted you'll have to
377 // update SessionService/TabRestoreService appropriately. 389 // update SessionService/TabRestoreService appropriately.
378 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 390 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
379 391
380 // See the accessors above for descriptions. 392 // See the accessors above for descriptions.
381 int unique_id_; 393 int unique_id_;
382 scoped_refptr<SiteInstance> site_instance_; 394 scoped_refptr<SiteInstance> site_instance_;
383 PageType page_type_; 395 PageType page_type_;
384 GURL url_; 396 GURL url_;
385 GURL referrer_; 397 GURL referrer_;
386 GURL virtual_url_; 398 GURL virtual_url_;
387 string16 title_; 399 string16 title_;
388 FaviconStatus favicon_; 400 FaviconStatus favicon_;
389 std::string content_state_; 401 std::string content_state_;
390 int32 page_id_; 402 int32 page_id_;
391 SSLStatus ssl_; 403 SSLStatus ssl_;
392 PageTransition::Type transition_type_; 404 PageTransition::Type transition_type_;
393 GURL user_typed_url_; 405 GURL user_typed_url_;
394 bool has_post_data_; 406 bool has_post_data_;
395 bool restored_; 407 RestoreType restore_type_;
396 408
397 // This is a cached version of the result of GetTitleForDisplay. It prevents 409 // This is a cached version of the result of GetTitleForDisplay. It prevents
398 // us from having to do URL formatting on the URL evey time the title is 410 // us from having to do URL formatting on the URL evey time the title is
399 // displayed. When the URL, virtual URL, or title is set, this should be 411 // displayed. When the URL, virtual URL, or title is set, this should be
400 // cleared to force a refresh. 412 // cleared to force a refresh.
401 string16 cached_display_title_; 413 string16 cached_display_title_;
402 414
403 // Copy and assignment is explicitly allowed for this class. 415 // Copy and assignment is explicitly allowed for this class.
404 }; 416 };
405 417
406 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 418 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller_unittest.cc ('k') | chrome/browser/tab_contents/navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698