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

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

Issue 7791029: When the user navigates to the home page, make sure to set the RLZ string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ENTRY_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 // All the SSL flags and state. See SSLStatus above. 313 // All the SSL flags and state. See SSLStatus above.
314 const SSLStatus& ssl() const { 314 const SSLStatus& ssl() const {
315 return ssl_; 315 return ssl_;
316 } 316 }
317 SSLStatus& ssl() { 317 SSLStatus& ssl() {
318 return ssl_; 318 return ssl_;
319 } 319 }
320 320
321 // Extra headers (separated by \n) to send during the request.
322 void set_extra_headers(const std::string& extra_headers) {
323 extra_headers_ = extra_headers;
324 }
325 const std::string& extra_headers() const {
326 return extra_headers_;
327 }
328
321 // Page-related helpers ------------------------------------------------------ 329 // Page-related helpers ------------------------------------------------------
322 330
323 // Returns the title to be displayed on the tab. This could be the title of 331 // Returns the title to be displayed on the tab. This could be the title of
324 // the page if it is available or the URL. |languages| is the list of 332 // the page if it is available or the URL. |languages| is the list of
325 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper 333 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper
326 // URL formatting isn't needed (e.g., unit tests). 334 // URL formatting isn't needed (e.g., unit tests).
327 const string16& GetTitleForDisplay(const std::string& languages) const; 335 const string16& GetTitleForDisplay(const std::string& languages) const;
328 336
329 // Returns true if the current tab is in view source mode. This will be false 337 // Returns true if the current tab is in view source mode. This will be false
330 // if there is no navigation. 338 // if there is no navigation.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 398 }
391 RestoreType restore_type() const { 399 RestoreType restore_type() const {
392 return restore_type_; 400 return restore_type_;
393 } 401 }
394 402
395 private: 403 private:
396 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 404 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
397 // Session/Tab restore save portions of this class so that it can be recreated 405 // Session/Tab restore save portions of this class so that it can be recreated
398 // later. If you add a new field that needs to be persisted you'll have to 406 // later. If you add a new field that needs to be persisted you'll have to
399 // update SessionService/TabRestoreService appropriately. 407 // update SessionService/TabRestoreService appropriately.
400 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 408 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
sky 2011/08/30 17:05:25 I think you need to update session restore to deal
Roger Tawa OOO till Jul 10th 2011/08/30 18:58:32 Done. Please take a close look though.
401 409
402 // See the accessors above for descriptions. 410 // See the accessors above for descriptions.
403 int unique_id_; 411 int unique_id_;
404 scoped_refptr<SiteInstance> site_instance_; 412 scoped_refptr<SiteInstance> site_instance_;
405 PageType page_type_; 413 PageType page_type_;
406 GURL url_; 414 GURL url_;
407 GURL referrer_; 415 GURL referrer_;
408 GURL virtual_url_; 416 GURL virtual_url_;
409 bool update_virtual_url_with_url_; 417 bool update_virtual_url_with_url_;
410 string16 title_; 418 string16 title_;
411 FaviconStatus favicon_; 419 FaviconStatus favicon_;
412 std::string content_state_; 420 std::string content_state_;
413 int32 page_id_; 421 int32 page_id_;
414 SSLStatus ssl_; 422 SSLStatus ssl_;
415 PageTransition::Type transition_type_; 423 PageTransition::Type transition_type_;
416 GURL user_typed_url_; 424 GURL user_typed_url_;
417 bool has_post_data_; 425 bool has_post_data_;
418 RestoreType restore_type_; 426 RestoreType restore_type_;
427 std::string extra_headers_;
419 428
420 // This is a cached version of the result of GetTitleForDisplay. It prevents 429 // This is a cached version of the result of GetTitleForDisplay. It prevents
421 // us from having to do URL formatting on the URL evey time the title is 430 // us from having to do URL formatting on the URL every time the title is
422 // displayed. When the URL, virtual URL, or title is set, this should be 431 // displayed. When the URL, virtual URL, or title is set, this should be
423 // cleared to force a refresh. 432 // cleared to force a refresh.
424 mutable string16 cached_display_title_; 433 mutable string16 cached_display_title_;
425 434
426 // Copy and assignment is explicitly allowed for this class. 435 // Copy and assignment is explicitly allowed for this class.
427 }; 436 };
428 437
429 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 438 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698