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

Side by Side Diff: chrome/browser/navigation_entry.cc

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
« no previous file with comments | « chrome/browser/navigation_entry.h ('k') | chrome/browser/page_navigator.h » ('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) 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 #include "chrome/browser/navigation_entry.h" 5 #include "chrome/browser/navigation_entry.h"
6 6
7 #include "chrome/common/resource_bundle.h" 7 #include "chrome/common/resource_bundle.h"
8 8
9 // Use this to get a new unique ID for a NavigationEntry during construction. 9 // Use this to get a new unique ID for a NavigationEntry during construction.
10 // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator). 10 // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator).
(...skipping 23 matching lines...) Expand all
34 page_id_(-1), 34 page_id_(-1),
35 transition_type_(PageTransition::LINK), 35 transition_type_(PageTransition::LINK),
36 has_post_data_(false), 36 has_post_data_(false),
37 restored_(false) { 37 restored_(false) {
38 } 38 }
39 39
40 NavigationEntry::NavigationEntry(TabContentsType type, 40 NavigationEntry::NavigationEntry(TabContentsType type,
41 SiteInstance* instance, 41 SiteInstance* instance,
42 int page_id, 42 int page_id,
43 const GURL& url, 43 const GURL& url,
44 const GURL& referrer,
44 const std::wstring& title, 45 const std::wstring& title,
45 PageTransition::Type transition_type) 46 PageTransition::Type transition_type)
46 : unique_id_(GetUniqueID()), 47 : unique_id_(GetUniqueID()),
47 tab_type_(type), 48 tab_type_(type),
48 site_instance_(instance), 49 site_instance_(instance),
49 page_type_(NORMAL_PAGE), 50 page_type_(NORMAL_PAGE),
50 url_(url), 51 url_(url),
52 referrer_(referrer),
51 title_(title), 53 title_(title),
52 page_id_(page_id), 54 page_id_(page_id),
53 transition_type_(transition_type), 55 transition_type_(transition_type),
54 has_post_data_(false), 56 has_post_data_(false),
55 restored_(false) { 57 restored_(false) {
56 } 58 }
57 59
58 const std::wstring& NavigationEntry::GetTitleForDisplay() { 60 const std::wstring& NavigationEntry::GetTitleForDisplay() {
59 if (title_.empty()) 61 if (title_.empty())
60 return url_as_string_; 62 return url_as_string_;
61 return title_; 63 return title_;
62 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/navigation_entry.h ('k') | chrome/browser/page_navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698