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

Side by Side Diff: content/browser/web_contents/navigation_entry_impl.cc

Issue 11415292: [Search] No longer reverting omnibox text on instant search (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: More tests Created 8 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
OLDNEW
1 // Copyright (c) 2012 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 #include "content/browser/web_contents/navigation_entry_impl.h" 5 #include "content/browser/web_contents/navigation_entry_impl.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/public/common/content_constants.h" 9 #include "content/public/common/content_constants.h"
10 #include "content/public/common/url_constants.h" 10 #include "content/public/common/url_constants.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const string16& title, 56 const string16& title,
57 PageTransition transition_type, 57 PageTransition transition_type,
58 bool is_renderer_initiated) 58 bool is_renderer_initiated)
59 : unique_id_(GetUniqueIDInConstructor()), 59 : unique_id_(GetUniqueIDInConstructor()),
60 site_instance_(instance), 60 site_instance_(instance),
61 page_type_(PAGE_TYPE_NORMAL), 61 page_type_(PAGE_TYPE_NORMAL),
62 url_(url), 62 url_(url),
63 referrer_(referrer), 63 referrer_(referrer),
64 update_virtual_url_with_url_(false), 64 update_virtual_url_with_url_(false),
65 title_(title), 65 title_(title),
66 search_terms_(string16()),
akalin 2012/12/05 19:40:27 unneeded
Mathieu 2012/12/05 20:42:16 Done.
66 page_id_(page_id), 67 page_id_(page_id),
67 transition_type_(transition_type), 68 transition_type_(transition_type),
68 has_post_data_(false), 69 has_post_data_(false),
69 post_id_(-1), 70 post_id_(-1),
70 restore_type_(RESTORE_NONE), 71 restore_type_(RESTORE_NONE),
71 is_overriding_user_agent_(false), 72 is_overriding_user_agent_(false),
72 is_renderer_initiated_(is_renderer_initiated), 73 is_renderer_initiated_(is_renderer_initiated),
73 should_replace_entry_(false), 74 should_replace_entry_(false),
74 can_load_local_resources_(false) { 75 can_load_local_resources_(false) {
75 } 76 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 122
122 void NavigationEntryImpl::SetTitle(const string16& title) { 123 void NavigationEntryImpl::SetTitle(const string16& title) {
123 title_ = title; 124 title_ = title;
124 cached_display_title_.clear(); 125 cached_display_title_.clear();
125 } 126 }
126 127
127 const string16& NavigationEntryImpl::GetTitle() const { 128 const string16& NavigationEntryImpl::GetTitle() const {
128 return title_; 129 return title_;
129 } 130 }
130 131
132 void NavigationEntryImpl::SetSearchTerms(const string16& search_terms) {
133 search_terms_ = search_terms;
134 }
135
136 const string16& NavigationEntryImpl::GetSearchTerms() const {
137 return search_terms_;
138 }
139
131 void NavigationEntryImpl::SetContentState(const std::string& state) { 140 void NavigationEntryImpl::SetContentState(const std::string& state) {
132 content_state_ = state; 141 content_state_ = state;
133 } 142 }
134 143
135 const std::string& NavigationEntryImpl::GetContentState() const { 144 const std::string& NavigationEntryImpl::GetContentState() const {
136 return content_state_; 145 return content_state_;
137 } 146 }
138 147
139 void NavigationEntryImpl::SetPageID(int page_id) { 148 void NavigationEntryImpl::SetPageID(int page_id) {
140 page_id_ = page_id; 149 page_id_ = page_id;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 274
266 void NavigationEntryImpl::SetCanLoadLocalResources(bool allow) { 275 void NavigationEntryImpl::SetCanLoadLocalResources(bool allow) {
267 can_load_local_resources_ = allow; 276 can_load_local_resources_ = allow;
268 } 277 }
269 278
270 bool NavigationEntryImpl::GetCanLoadLocalResources() const { 279 bool NavigationEntryImpl::GetCanLoadLocalResources() const {
271 return can_load_local_resources_; 280 return can_load_local_resources_;
272 } 281 }
273 282
274 } // namespace content 283 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698