diff options
author | gcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 02:02:08 +0000 |
---|---|---|
committer | gcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 02:02:08 +0000 |
commit | 6c37c5fa3730dfce685d5cde6e6c47669220c546 (patch) | |
tree | ea38d84809d5db0c9006ef1d438f54050b98cd92 /components | |
parent | b5bba1fd6025e271948e8f99ca2ea7c55cb5de2c (diff) | |
download | chromium_src-6c37c5fa3730dfce685d5cde6e6c47669220c546.zip chromium_src-6c37c5fa3730dfce685d5cde6e6c47669220c546.tar.gz chromium_src-6c37c5fa3730dfce685d5cde6e6c47669220c546.tar.bz2 |
Pull password generation code out of AutofillManager.
BUG=181702
Review URL: https://chromiumcodereview.appspot.com/14273003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
8 files changed, 0 insertions, 338 deletions
diff --git a/components/autofill/browser/autofill_manager.cc b/components/autofill/browser/autofill_manager.cc index 0c01127..6ab20c7 100644 --- a/components/autofill/browser/autofill_manager.cc +++ b/components/autofill/browser/autofill_manager.cc @@ -33,7 +33,6 @@ #include "components/autofill/browser/autofill_type.h" #include "components/autofill/browser/credit_card.h" #include "components/autofill/browser/form_structure.h" -#include "components/autofill/browser/password_generator.h" #include "components/autofill/browser/personal_data_manager.h" #include "components/autofill/browser/phone_number.h" #include "components/autofill/browser/phone_number_i18n.h" @@ -215,16 +214,9 @@ AutofillManager::AutofillManager(content::WebContents* web_contents, user_did_type_(false), user_did_autofill_(false), user_did_edit_autofilled_field_(false), - password_generation_enabled_(false), external_delegate_(NULL), test_delegate_(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { - RegisterWithSyncService(); - registrar_.Init(manager_delegate_->GetPrefs()); - registrar_.Add( - prefs::kPasswordGenerationEnabled, - base::Bind(&AutofillManager::OnPasswordGenerationEnabledChanged, - base::Unretained(this))); } AutofillManager::~AutofillManager() {} @@ -234,9 +226,6 @@ void AutofillManager::RegisterUserPrefs(PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kAutofillEnabled, true, PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref(prefs::kPasswordGenerationEnabled, - true, - PrefRegistrySyncable::SYNCABLE_PREF); #if defined(OS_MACOSX) || defined(OS_ANDROID) registry->RegisterBooleanPref(prefs::kAutofillAuxiliaryProfilesEnabled, true, @@ -254,63 +243,6 @@ void AutofillManager::RegisterUserPrefs(PrefRegistrySyncable* registry) { PrefRegistrySyncable::UNSYNCABLE_PREF); } -void AutofillManager::RegisterWithSyncService() { - // TODO(joi): If/when SupportsWebData supports structured - // destruction ordering, we could use a base::Unretained here and - // just unsubscribe in our destructor. As is, we can't guarantee - // that the delegate doesn't get destroyed (by WebContent's - // SupportsUserData) right before the AutofillManager. - manager_delegate_->SetSyncStateChangedCallback(base::Bind( - &AutofillManager::OnSyncStateChanged, weak_ptr_factory_.GetWeakPtr())); -} - -void AutofillManager::SendPasswordGenerationStateToRenderer( - content::RenderViewHost* host, bool enabled) { - host->Send(new AutofillMsg_PasswordGenerationEnabled(host->GetRoutingID(), - enabled)); -} - -// In order for password generation to be enabled, we need to make sure: -// (1) Password sync is enabled, -// (2) Password manager is enabled, and -// (3) Password generation preference check box is checked. -void AutofillManager::UpdatePasswordGenerationState( - content::RenderViewHost* host, - bool new_renderer) { - bool saving_passwords_enabled = manager_delegate_->IsSavingPasswordsEnabled(); - bool preference_checked = manager_delegate_->GetPrefs()->GetBoolean( - prefs::kPasswordGenerationEnabled); - - bool new_password_generation_enabled = - manager_delegate_->IsPasswordSyncEnabled() && - saving_passwords_enabled && - preference_checked; - - if (new_password_generation_enabled != password_generation_enabled_ || - new_renderer) { - password_generation_enabled_ = new_password_generation_enabled; - SendPasswordGenerationStateToRenderer(host, password_generation_enabled_); - } -} - -void AutofillManager::RenderViewCreated(content::RenderViewHost* host) { - UpdatePasswordGenerationState(host, true); -} - -void AutofillManager::OnPasswordGenerationEnabledChanged() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - UpdatePasswordGenerationState(web_contents()->GetRenderViewHost(), false); -} - -void AutofillManager::OnSyncStateChanged() { - // It is possible for sync state to change during tab contents destruction. - // In this case, we don't need to update the renderer since it's going away. - if (web_contents() && web_contents()->GetRenderViewHost()) { - UpdatePasswordGenerationState(web_contents()->GetRenderViewHost(), - false); - } -} - void AutofillManager::DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) { @@ -352,8 +284,6 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) { OnDidEndTextFieldEditing) IPC_MESSAGE_HANDLER(AutofillHostMsg_HideAutofillUi, OnHideAutofillUi) - IPC_MESSAGE_HANDLER(AutofillHostMsg_ShowPasswordGenerationPopup, - OnShowPasswordGenerationPopup) IPC_MESSAGE_HANDLER(AutofillHostMsg_AddPasswordFormMapping, OnAddPasswordFormMapping) IPC_MESSAGE_HANDLER(AutofillHostMsg_ShowPasswordSuggestions, @@ -372,11 +302,6 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) { return handled; } -void AutofillManager::WebContentsDestroyed(content::WebContents* web_contents) { - // Unsubscribe. - manager_delegate_->SetSyncStateChangedCallback(base::Closure()); -} - bool AutofillManager::OnFormSubmitted(const FormData& form, const TimeTicks& timestamp) { // Let AutoComplete know as well. @@ -737,15 +662,6 @@ void AutofillManager::OnHideAutofillUi() { manager_delegate_->HideAutocheckoutBubble(); } -void AutofillManager::OnShowPasswordGenerationPopup( - const gfx::Rect& bounds, - int max_length, - const content::PasswordForm& form) { - password_generator_.reset(new autofill::PasswordGenerator(max_length)); - manager_delegate_->ShowPasswordGenerationBubble( - bounds, form, password_generator_.get()); -} - void AutofillManager::RemoveAutofillProfileOrCreditCard(int unique_id) { const AutofillDataModel* data_model = NULL; size_t variant = 0; @@ -1037,14 +953,11 @@ AutofillManager::AutofillManager(content::WebContents* web_contents, user_did_type_(false), user_did_autofill_(false), user_did_edit_autofilled_field_(false), - password_generation_enabled_(false), external_delegate_(NULL), test_delegate_(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { DCHECK(web_contents); DCHECK(manager_delegate_); - RegisterWithSyncService(); - // Test code doesn't need registrar_. } void AutofillManager::set_metric_logger(const AutofillMetrics* metric_logger) { diff --git a/components/autofill/browser/autofill_manager.h b/components/autofill/browser/autofill_manager.h index ea63991..9912c23 100644 --- a/components/autofill/browser/autofill_manager.h +++ b/components/autofill/browser/autofill_manager.h @@ -17,7 +17,6 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" -#include "base/prefs/pref_change_registrar.h" #include "base/string16.h" #include "base/supports_user_data.h" #include "base/time.h" @@ -36,15 +35,12 @@ class GURL; class PrefRegistrySyncable; -class ProfileSyncService; struct ViewHostMsg_FrameNavigate_Params; namespace content { class RenderViewHost; class WebContents; - -struct PasswordForm; } namespace gfx { @@ -67,7 +63,6 @@ class AutofillManagerTestDelegate; class AutofillMetrics; class CreditCard; class FormStructureBrowserTest; -class PasswordGenerator; struct FormData; struct FormFieldData; @@ -103,9 +98,6 @@ class AutofillManager : public content::WebContentsObserver, void OnDidFillAutofillFormData(const base::TimeTicks& timestamp); void OnShowAutofillDialog(); void OnDidPreviewAutofillFormData(); - void OnShowPasswordGenerationPopup(const gfx::Rect& bounds, - int max_length, - const content::PasswordForm& form); // Remove the credit card or Autofill profile that matches |unique_id| // from the database. @@ -162,12 +154,6 @@ class AutofillManager : public content::WebContentsObserver, // Reset cache. void Reset(); - // Informs the renderer of the current password generation state. This is a - // separate function to aid with testing. - virtual void SendPasswordGenerationStateToRenderer( - content::RenderViewHost* host, - bool enabled); - // Logs quality metrics for the |submitted_form| and uploads the form data // to the crowdsourcing server, if appropriate. virtual void UploadFormDataAsyncCallback( @@ -217,33 +203,15 @@ class AutofillManager : public content::WebContentsObserver, private: // content::WebContentsObserver: - virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void WebContentsDestroyed( - content::WebContents* web_contents) OVERRIDE; // AutofillDownloadManager::Observer: virtual void OnLoadedServerPredictions( const std::string& response_xml) OVERRIDE; - void OnSyncStateChanged(); - - // Register as an observer with the sync service. - void RegisterWithSyncService(); - - // Called when password generation preference state changes. - void OnPasswordGenerationEnabledChanged(); - - // Determines what the current state of password generation is, and if it has - // changed from |password_generation_enabled_|. If it has changed or if - // |new_renderer| is true, it notifies the renderer of this change via - // SendPasswordGenerationStateToRenderer. - void UpdatePasswordGenerationState(content::RenderViewHost* host, - bool new_renderer); - void OnFormsSeen(const std::vector<FormData>& forms, const base::TimeTicks& timestamp, bool has_more_forms); @@ -411,15 +379,6 @@ class AutofillManager : public content::WebContentsObserver, // When the user first interacted with a potentially fillable form on this // page. base::TimeTicks initial_interaction_timestamp_; - // If password generation is enabled. We cache this value so that we don't - // spam the renderer with messages during startup when the sync state - // is changing rapidly. - bool password_generation_enabled_; - // Listens for changes to the 'enabled' state for password generation. - PrefChangeRegistrar registrar_; - - // To be passed to the password generation UI to generate the password. - scoped_ptr<autofill::PasswordGenerator> password_generator_; // Our copy of the form data. ScopedVector<FormStructure> form_structures_; diff --git a/components/autofill/browser/autofill_manager_delegate.h b/components/autofill/browser/autofill_manager_delegate.h index a58025d..5f6bec7 100644 --- a/components/autofill/browser/autofill_manager_delegate.h +++ b/components/autofill/browser/autofill_manager_delegate.h @@ -24,7 +24,6 @@ class RectF; class GURL; class InfoBarService; class PrefService; -class ProfileSyncServiceBase; namespace autofill { @@ -73,20 +72,6 @@ class AutofillManagerDelegate { // Hides the associated request autocomplete dialog (if it exists). virtual void HideRequestAutocompleteDialog() = 0; - // Returns true if saving passwords is currently enabled for the - // delegate. - virtual bool IsSavingPasswordsEnabled() const = 0; - - // Returns true if Sync is enabled for the passwords datatype. - virtual bool IsPasswordSyncEnabled() const = 0; - - // Sets a callback that will be called when sync state changes. - // - // Set the callback to an object for which |is_null()| evaluates to - // true to stop receiving notifications - // (e.g. SetSyncStateChangedCallback(base::Closure())). - virtual void SetSyncStateChangedCallback(const base::Closure& callback) = 0; - // Causes an error explaining that Autocheckout has failed to be displayed to // the user. virtual void OnAutocheckoutError() = 0; @@ -101,13 +86,6 @@ class AutofillManagerDelegate { const CreditCard& credit_card, const base::Closure& save_card_callback) = 0; - // Causes the password generation bubble UI to be shown using the - // specified form with the given bounds. - virtual void ShowPasswordGenerationBubble( - const gfx::Rect& bounds, - const content::PasswordForm& form, - autofill::PasswordGenerator* generator) = 0; - // Causes the Autocheckout bubble UI to be displayed. |bounding_box| is the // anchor for the bubble. |native_view| is the parent view of the bubble. // |callback| is run if the bubble is accepted. diff --git a/components/autofill/browser/autofill_manager_unittest.cc b/components/autofill/browser/autofill_manager_unittest.cc index 80b46b0..9f53518 100644 --- a/components/autofill/browser/autofill_manager_unittest.cc +++ b/components/autofill/browser/autofill_manager_unittest.cc @@ -564,19 +564,6 @@ class TestAutofillManager : public AutofillManager { submitted_form_signature_ = submitted_form.FormSignature(); } - virtual void SendPasswordGenerationStateToRenderer( - content::RenderViewHost* host, bool enabled) OVERRIDE { - sent_states_.push_back(enabled); - } - - const std::vector<bool>& GetSentStates() { - return sent_states_; - } - - void ClearSentStates() { - sent_states_.clear(); - } - const std::string GetSubmittedFormSignature() { return submitted_form_signature_; } @@ -631,7 +618,6 @@ class TestAutofillManager : public AutofillManager { std::string autocheckout_url_prefix_; std::string submitted_form_signature_; std::vector<FieldTypeSet> expected_submitted_field_types_; - std::vector<bool> sent_states_; DISALLOW_COPY_AND_ASSIGN(TestAutofillManager); }; @@ -690,10 +676,6 @@ class AutofillManagerTest : public ChromeRenderViewHostTestHarness { return new TestingProfile(); } - void UpdatePasswordGenerationState(bool new_renderer) { - autofill_manager_->UpdatePasswordGenerationState(NULL, new_renderer); - } - void GetAutofillSuggestions(int query_id, const FormData& form, const FormFieldData& field) { @@ -808,20 +790,6 @@ class AutofillManagerTest : public ChromeRenderViewHostTestHarness { DISALLOW_COPY_AND_ASSIGN(AutofillManagerTest); }; -class IncognitoAutofillManagerTest : public AutofillManagerTest { - public: - IncognitoAutofillManagerTest() {} - virtual ~IncognitoAutofillManagerTest() {} - - virtual TestingProfile* CreateProfile() OVERRIDE { - // Create an incognito profile. - TestingProfile::Builder builder; - scoped_ptr<TestingProfile> profile = builder.Build(); - profile->set_incognito(true); - return profile.release(); - } -}; - class TestFormStructure : public FormStructure { public: explicit TestFormStructure(const FormData& form) @@ -3103,134 +3071,6 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) { FormSubmitted(form); } -TEST_F(AutofillManagerTest, UpdatePasswordSyncState) { - PasswordManagerDelegateImpl::CreateForWebContents(web_contents()); - PasswordManager::CreateForWebContentsAndDelegate( - web_contents(), - PasswordManagerDelegateImpl::FromWebContents(web_contents())); - - PrefService* prefs = components::UserPrefs::Get(profile()); - - // Allow this test to control what should get synced. - prefs->SetBoolean(::prefs::kSyncKeepEverythingSynced, false); - // Always set password generation enabled check box so we can test the - // behavior of password sync. - prefs->SetBoolean(::autofill::prefs::kPasswordGenerationEnabled, true); - - // Sync some things, but not passwords. Shouldn't send anything since - // password generation is disabled by default. - ProfileSyncService* sync_service = ProfileSyncServiceFactory::GetForProfile( - profile()); - sync_service->SetSyncSetupCompleted(); - syncer::ModelTypeSet preferred_set; - preferred_set.Put(syncer::EXTENSIONS); - preferred_set.Put(syncer::PREFERENCES); - sync_service->ChangePreferredDataTypes(preferred_set); - syncer::ModelTypeSet new_set = sync_service->GetPreferredDataTypes(); - UpdatePasswordGenerationState(false); - EXPECT_EQ(0u, autofill_manager_->GetSentStates().size()); - - // Now sync passwords. - preferred_set.Put(syncer::PASSWORDS); - sync_service->ChangePreferredDataTypes(preferred_set); - UpdatePasswordGenerationState(false); - EXPECT_EQ(1u, autofill_manager_->GetSentStates().size()); - EXPECT_TRUE(autofill_manager_->GetSentStates()[0]); - autofill_manager_->ClearSentStates(); - - // Add some additional synced state. Nothing should be sent. - preferred_set.Put(syncer::THEMES); - sync_service->ChangePreferredDataTypes(preferred_set); - UpdatePasswordGenerationState(false); - EXPECT_EQ(0u, autofill_manager_->GetSentStates().size()); - - // Disable syncing. This should disable the feature. - sync_service->DisableForUser(); - UpdatePasswordGenerationState(false); - EXPECT_EQ(1u, autofill_manager_->GetSentStates().size()); - EXPECT_FALSE(autofill_manager_->GetSentStates()[0]); - autofill_manager_->ClearSentStates(); - - // When a new render_view is created, we send the state even if it's the - // same. - UpdatePasswordGenerationState(true); - EXPECT_EQ(1u, autofill_manager_->GetSentStates().size()); - EXPECT_FALSE(autofill_manager_->GetSentStates()[0]); - autofill_manager_->ClearSentStates(); -} - -TEST_F(IncognitoAutofillManagerTest, UpdatePasswordSyncStateIncognito) { - // Disable password manager by going incognito, and enable syncing. The - // feature should still be disabled, and nothing will be sent. - PasswordManagerDelegateImpl::CreateForWebContents(web_contents()); - PasswordManager::CreateForWebContentsAndDelegate( - web_contents(), - PasswordManagerDelegateImpl::FromWebContents(web_contents())); - - PrefService* prefs = components::UserPrefs::Get(profile()); - - // Allow this test to control what should get synced. - prefs->SetBoolean(::prefs::kSyncKeepEverythingSynced, false); - // Always set password generation enabled check box so we can test the - // behavior of password sync. - prefs->SetBoolean(::autofill::prefs::kPasswordGenerationEnabled, true); - - browser_sync::SyncPrefs sync_prefs(profile()->GetPrefs()); - sync_prefs.SetSyncSetupCompleted(); - UpdatePasswordGenerationState(false); - EXPECT_EQ(0u, autofill_manager_->GetSentStates().size()); -} - -TEST_F(AutofillManagerTest, UpdatePasswordGenerationState) { - PasswordManagerDelegateImpl::CreateForWebContents(web_contents()); - PasswordManager::CreateForWebContentsAndDelegate( - web_contents(), - PasswordManagerDelegateImpl::FromWebContents(web_contents())); - - PrefService* prefs = components::UserPrefs::Get(profile()); - - // Always set password sync enabled so we can test the behavior of password - // generation. - prefs->SetBoolean(::prefs::kSyncKeepEverythingSynced, false); - ProfileSyncService* sync_service = ProfileSyncServiceFactory::GetForProfile( - profile()); - sync_service->SetSyncSetupCompleted(); - syncer::ModelTypeSet preferred_set; - preferred_set.Put(syncer::PASSWORDS); - sync_service->ChangePreferredDataTypes(preferred_set); - - // Enabled state remains false, should not sent. - prefs->SetBoolean(::autofill::prefs::kPasswordGenerationEnabled, false); - UpdatePasswordGenerationState(false); - EXPECT_EQ(0u, autofill_manager_->GetSentStates().size()); - - // Enabled state from false to true, should sent true. - prefs->SetBoolean(::autofill::prefs::kPasswordGenerationEnabled, true); - UpdatePasswordGenerationState(false); - EXPECT_EQ(1u, autofill_manager_->GetSentStates().size()); - EXPECT_TRUE(autofill_manager_->GetSentStates()[0]); - autofill_manager_->ClearSentStates(); - - // Enabled states remains true, should not sent. - prefs->SetBoolean(::autofill::prefs::kPasswordGenerationEnabled, true); - UpdatePasswordGenerationState(false); - EXPECT_EQ(0u, autofill_manager_->GetSentStates().size()); - - // Enabled states from true to false, should sent false. - prefs->SetBoolean(::autofill::prefs::kPasswordGenerationEnabled, false); - UpdatePasswordGenerationState(false); - EXPECT_EQ(1u, autofill_manager_->GetSentStates().size()); - EXPECT_FALSE(autofill_manager_->GetSentStates()[0]); - autofill_manager_->ClearSentStates(); - - // When a new render_view is created, we send the state even if it's the - // same. - UpdatePasswordGenerationState(true); - EXPECT_EQ(1u, autofill_manager_->GetSentStates().size()); - EXPECT_FALSE(autofill_manager_->GetSentStates()[0]); - autofill_manager_->ClearSentStates(); -} - TEST_F(AutofillManagerTest, RemoveProfile) { // Add and remove an Autofill profile. AutofillProfile* profile = new AutofillProfile; diff --git a/components/autofill/browser/test_autofill_manager_delegate.cc b/components/autofill/browser/test_autofill_manager_delegate.cc index 6992107..f1dd511 100644 --- a/components/autofill/browser/test_autofill_manager_delegate.cc +++ b/components/autofill/browser/test_autofill_manager_delegate.cc @@ -24,17 +24,6 @@ PrefService* TestAutofillManagerDelegate::GetPrefs() { void TestAutofillManagerDelegate::HideRequestAutocompleteDialog() {} -bool TestAutofillManagerDelegate::IsSavingPasswordsEnabled() const { - return false; -} - -bool TestAutofillManagerDelegate::IsPasswordSyncEnabled() const { - return false; -} - -void TestAutofillManagerDelegate::SetSyncStateChangedCallback( - const base::Closure& callback) { } - void TestAutofillManagerDelegate::OnAutocheckoutError() {} void TestAutofillManagerDelegate::ShowAutofillSettings() {} @@ -44,11 +33,6 @@ void TestAutofillManagerDelegate::ConfirmSaveCreditCard( const CreditCard& credit_card, const base::Closure& save_card_callback) {} -void TestAutofillManagerDelegate::ShowPasswordGenerationBubble( - const gfx::Rect& bounds, - const content::PasswordForm& form, - autofill::PasswordGenerator* generator) {} - void TestAutofillManagerDelegate::ShowAutocheckoutBubble( const gfx::RectF& bounding_box, const base::Callback<void(bool)>& callback) {} diff --git a/components/autofill/browser/test_autofill_manager_delegate.h b/components/autofill/browser/test_autofill_manager_delegate.h index 03ad783..439f255 100644 --- a/components/autofill/browser/test_autofill_manager_delegate.h +++ b/components/autofill/browser/test_autofill_manager_delegate.h @@ -23,20 +23,12 @@ class TestAutofillManagerDelegate : public AutofillManagerDelegate { virtual autocheckout::WhitelistManager* GetAutocheckoutWhitelistManager() const OVERRIDE; virtual void HideRequestAutocompleteDialog() OVERRIDE; - virtual bool IsSavingPasswordsEnabled() const OVERRIDE; - virtual bool IsPasswordSyncEnabled() const OVERRIDE; - virtual void SetSyncStateChangedCallback( - const base::Closure& callback) OVERRIDE; virtual void OnAutocheckoutError() OVERRIDE; virtual void ShowAutofillSettings() OVERRIDE; virtual void ConfirmSaveCreditCard( const AutofillMetrics& metric_logger, const CreditCard& credit_card, const base::Closure& save_card_callback) OVERRIDE; - virtual void ShowPasswordGenerationBubble( - const gfx::Rect& bounds, - const content::PasswordForm& form, - autofill::PasswordGenerator* generator) OVERRIDE; virtual void ShowAutocheckoutBubble( const gfx::RectF& bounding_box, const base::Callback<void(bool)>& callback) OVERRIDE; diff --git a/components/autofill/common/autofill_pref_names.cc b/components/autofill/common/autofill_pref_names.cc index 7d437b6..d6e7f9b 100644 --- a/components/autofill/common/autofill_pref_names.cc +++ b/components/autofill/common/autofill_pref_names.cc @@ -21,8 +21,5 @@ const char kAutofillNegativeUploadRate[] = "autofill.negative_upload_rate"; // Double that indicates positive (for matched forms) upload rate. const char kAutofillPositiveUploadRate[] = "autofill.positive_upload_rate"; -// Boolean that is true when password generation is enabled. -const char kPasswordGenerationEnabled[] = "password_generation.enabled"; - } // namespace prefs } // namespace autofill diff --git a/components/autofill/common/autofill_pref_names.h b/components/autofill/common/autofill_pref_names.h index c67ac1a..b2269fe 100644 --- a/components/autofill/common/autofill_pref_names.h +++ b/components/autofill/common/autofill_pref_names.h @@ -14,7 +14,6 @@ extern const char kAutofillAuxiliaryProfilesEnabled[]; extern const char kAutofillEnabled[]; extern const char kAutofillNegativeUploadRate[]; extern const char kAutofillPositiveUploadRate[]; -extern const char kPasswordGenerationEnabled[]; } // namespace prefs } // namespace autofill |