OLD | NEW |
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 "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 5 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/search_engines/template_url.h" | 8 #include "chrome/browser/search_engines/template_url.h" |
9 #include "chrome/browser/search_engines/template_url_fetcher.h" | 9 #include "chrome/browser/search_engines/template_url_fetcher.h" |
10 #include "chrome/browser/search_engines/template_url_model.h" | 10 #include "chrome/browser/search_engines/template_url_model.h" |
11 #include "chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h" | 11 #include "chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h" |
12 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
13 #include "chrome/common/render_messages_params.h" | 13 #include "content/common/view_messages.h" |
14 #include "content/browser/tab_contents/tab_contents.h" | 14 #include "content/browser/tab_contents/tab_contents.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Returns true if the entry's transition type is FORM_SUBMIT. | 18 // Returns true if the entry's transition type is FORM_SUBMIT. |
19 bool IsFormSubmit(const NavigationEntry* entry) { | 19 bool IsFormSubmit(const NavigationEntry* entry) { |
20 return (PageTransition::StripQualifier(entry->transition_type()) == | 20 return (PageTransition::StripQualifier(entry->transition_type()) == |
21 PageTransition::FORM_SUBMIT); | 21 PageTransition::FORM_SUBMIT); |
22 } | 22 } |
23 | 23 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // The favicon url isn't valid. This means there really isn't a favicon, | 191 // The favicon url isn't valid. This means there really isn't a favicon, |
192 // or the favicon url wasn't obtained before the load started. This assumes | 192 // or the favicon url wasn't obtained before the load started. This assumes |
193 // the later. | 193 // the later. |
194 // TODO(sky): Need a way to set the favicon that doesn't involve generating | 194 // TODO(sky): Need a way to set the favicon that doesn't involve generating |
195 // its url. | 195 // its url. |
196 new_url->SetFaviconURL(TemplateURL::GenerateFaviconURL(params.referrer)); | 196 new_url->SetFaviconURL(TemplateURL::GenerateFaviconURL(params.referrer)); |
197 } | 197 } |
198 new_url->set_safe_for_autoreplace(true); | 198 new_url->set_safe_for_autoreplace(true); |
199 url_model->Add(new_url); | 199 url_model->Add(new_url); |
200 } | 200 } |
OLD | NEW |