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

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

Issue 21217: Don't store empty values for autofill (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/autofill_manager.h ('k') | chrome/browser/browser.cc » ('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/autofill_manager.h" 5 #include "chrome/browser/autofill_manager.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/profile.h" 8 #include "chrome/browser/profile.h"
9 #include "chrome/browser/tab_contents/web_contents.h" 9 #include "chrome/browser/tab_contents/web_contents.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "chrome/common/pref_service.h"
12
13 // static
14 void AutofillManager::RegisterUserPrefs(PrefService* prefs) {
15 prefs->RegisterBooleanPref(prefs::kFormAutofillEnabled, true);
16 }
11 17
12 AutofillManager::AutofillManager(WebContents* web_contents) : 18 AutofillManager::AutofillManager(WebContents* web_contents) :
13 web_contents_(web_contents), 19 web_contents_(web_contents),
14 pending_query_handle_(0), 20 pending_query_handle_(0),
15 node_id_(0), 21 node_id_(0),
16 request_id_(0) { 22 request_id_(0) {
17 form_autofill_enabled_.Init(prefs::kFormAutofillEnabled, 23 form_autofill_enabled_.Init(prefs::kFormAutofillEnabled,
18 profile()->GetPrefs(), NULL); 24 profile()->GetPrefs(), NULL);
19 } 25 }
20 26
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const AutofillForm& form) { 107 const AutofillForm& form) {
102 if (!*form_autofill_enabled_) 108 if (!*form_autofill_enabled_)
103 return; 109 return;
104 110
105 if (profile()->IsOffTheRecord()) 111 if (profile()->IsOffTheRecord())
106 return; 112 return;
107 113
108 profile()->GetWebDataService(Profile::EXPLICIT_ACCESS)-> 114 profile()->GetWebDataService(Profile::EXPLICIT_ACCESS)->
109 AddAutofillFormElements(form.elements); 115 AddAutofillFormElements(form.elements);
110 } 116 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill_manager.h ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698