Index: components/autofill/content/browser/autofill_driver_impl.h |
diff --git a/components/autofill/content/browser/autofill_driver_impl.h b/components/autofill/content/browser/autofill_driver_impl.h |
index ffce5effb0c6b8e155c949371df090a65ef40d9b..5a3d41d4361d09208946cc40bb14c6e82d09cfd1 100644 |
--- a/components/autofill/content/browser/autofill_driver_impl.h |
+++ b/components/autofill/content/browser/autofill_driver_impl.h |
@@ -54,7 +54,7 @@ class AutofillDriverImpl : public AutofillDriver, |
void SetAutofillExternalDelegate( |
scoped_ptr<AutofillExternalDelegate> delegate); |
- AutofillManager* autofill_manager() { return &autofill_manager_; } |
+ AutofillManager* autofill_manager() { return autofill_manager_.get(); } |
private: |
AutofillDriverImpl( |
@@ -71,13 +71,20 @@ class AutofillDriverImpl : public AutofillDriver, |
const content::FrameNavigateParams& params) OVERRIDE; |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ // Sets the manager to |manager|. Takes ownership of |manager|. |
+ void set_autofill_manager(scoped_ptr<AutofillManager> manager) { |
+ autofill_manager_.reset(manager.release()); |
Ilya Sherman
2013/06/20 00:07:16
nit: Can you use .Pass() instead of .release() her
blundell
2013/06/21 12:55:23
Done.
|
+ } |
+ |
// AutofillExternalDelegate instance that this object instantiates in the |
// case where the autofill native UI is enabled. |
scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_; |
// AutofillManager instance via which this object drives the shared Autofill |
// code. |
- AutofillManager autofill_manager_; |
+ scoped_ptr<AutofillManager> autofill_manager_; |
+ |
+ friend class AutofillDriverImplTest; |
Ilya Sherman
2013/06/20 00:07:16
Please don't add a friend class; instead, move set
blundell
2013/06/21 12:55:23
Done.
|
}; |
} // namespace autofill |