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

Side by Side Diff: chrome/browser/tab_contents/web_contents.cc

Issue 42258: Add way to remove entries from autocomplete (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/browser/tab_contents/web_contents.h ('k') | chrome/browser/webdata/web_data_service.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/tab_contents/web_contents.h" 5 #include "chrome/browser/tab_contents/web_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 const AutofillForm& form) { 1135 const AutofillForm& form) {
1136 GetAutofillManager()->AutofillFormSubmitted(form); 1136 GetAutofillManager()->AutofillFormSubmitted(form);
1137 } 1137 }
1138 1138
1139 void WebContents::GetAutofillSuggestions(const std::wstring& field_name, 1139 void WebContents::GetAutofillSuggestions(const std::wstring& field_name,
1140 const std::wstring& user_text, int64 node_id, int request_id) { 1140 const std::wstring& user_text, int64 node_id, int request_id) {
1141 GetAutofillManager()->FetchValuesForName(field_name, user_text, 1141 GetAutofillManager()->FetchValuesForName(field_name, user_text,
1142 kMaxAutofillMenuItems, node_id, request_id); 1142 kMaxAutofillMenuItems, node_id, request_id);
1143 } 1143 }
1144 1144
1145 void WebContents::RemoveAutofillEntry(const std::wstring& field_name,
1146 const std::wstring& value) {
1147 GetAutofillManager()->RemoveValueForName(field_name, value);
1148 }
1149
1145 // Checks to see if we should generate a keyword based on the OSDD, and if 1150 // Checks to see if we should generate a keyword based on the OSDD, and if
1146 // necessary uses TemplateURLFetcher to download the OSDD and create a keyword. 1151 // necessary uses TemplateURLFetcher to download the OSDD and create a keyword.
1147 void WebContents::PageHasOSDD(RenderViewHost* render_view_host, 1152 void WebContents::PageHasOSDD(RenderViewHost* render_view_host,
1148 int32 page_id, const GURL& url, 1153 int32 page_id, const GURL& url,
1149 bool autodetected) { 1154 bool autodetected) {
1150 // Make sure page_id is the current page, and the TemplateURLModel is loaded. 1155 // Make sure page_id is the current page, and the TemplateURLModel is loaded.
1151 DCHECK(url.is_valid()); 1156 DCHECK(url.is_valid());
1152 if (!controller() || !IsActiveEntry(page_id)) 1157 if (!controller() || !IsActiveEntry(page_id))
1153 return; 1158 return;
1154 TemplateURLModel* url_model = profile()->GetTemplateURLModel(); 1159 TemplateURLModel* url_model = profile()->GetTemplateURLModel();
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 // The favicon url isn't valid. This means there really isn't a favicon, 1883 // The favicon url isn't valid. This means there really isn't a favicon,
1879 // or the favicon url wasn't obtained before the load started. This assumes 1884 // or the favicon url wasn't obtained before the load started. This assumes
1880 // the later. 1885 // the later.
1881 // TODO(sky): Need a way to set the favicon that doesn't involve generating 1886 // TODO(sky): Need a way to set the favicon that doesn't involve generating
1882 // its url. 1887 // its url.
1883 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); 1888 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer));
1884 } 1889 }
1885 new_url->set_safe_for_autoreplace(true); 1890 new_url->set_safe_for_autoreplace(true);
1886 url_model->Add(new_url); 1891 url_model->Add(new_url);
1887 } 1892 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents.h ('k') | chrome/browser/webdata/web_data_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698