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

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

Issue 8806011: Make NavigationEntry and friends use content::Referrer instead of plain URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 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
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 #include "content/browser/tab_contents/navigation_entry.h" 5 #include "content/browser/tab_contents/navigation_entry.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/browser/site_instance.h" 9 #include "content/browser/site_instance.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 page_id_(-1), 42 page_id_(-1),
43 transition_type_(content::PAGE_TRANSITION_LINK), 43 transition_type_(content::PAGE_TRANSITION_LINK),
44 has_post_data_(false), 44 has_post_data_(false),
45 restore_type_(RESTORE_NONE), 45 restore_type_(RESTORE_NONE),
46 is_renderer_initiated_(false) { 46 is_renderer_initiated_(false) {
47 } 47 }
48 48
49 NavigationEntry::NavigationEntry(SiteInstance* instance, 49 NavigationEntry::NavigationEntry(SiteInstance* instance,
50 int page_id, 50 int page_id,
51 const GURL& url, 51 const GURL& url,
52 const GURL& referrer, 52 const content::Referrer& referrer,
53 const string16& title, 53 const string16& title,
54 content::PageTransition transition_type, 54 content::PageTransition transition_type,
55 bool is_renderer_initiated) 55 bool is_renderer_initiated)
56 : unique_id_(GetUniqueID()), 56 : unique_id_(GetUniqueID()),
57 site_instance_(instance), 57 site_instance_(instance),
58 page_type_(content::PAGE_TYPE_NORMAL), 58 page_type_(content::PAGE_TYPE_NORMAL),
59 url_(url), 59 url_(url),
60 referrer_(referrer), 60 referrer_(referrer),
61 update_virtual_url_with_url_(false), 61 update_virtual_url_with_url_(false),
62 title_(title), 62 title_(title),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 title = title.substr(slashpos + 1); 101 title = title.substr(slashpos + 1);
102 } 102 }
103 103
104 ui::ElideString(title, content::kMaxTitleChars, &cached_display_title_); 104 ui::ElideString(title, content::kMaxTitleChars, &cached_display_title_);
105 return cached_display_title_; 105 return cached_display_title_;
106 } 106 }
107 107
108 bool NavigationEntry::IsViewSourceMode() const { 108 bool NavigationEntry::IsViewSourceMode() const {
109 return virtual_url_.SchemeIs(chrome::kViewSourceScheme); 109 return virtual_url_.SchemeIs(chrome::kViewSourceScheme);
110 } 110 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/navigation_entry.h ('k') | content/browser/tab_contents/navigation_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698