summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 22:30:55 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 22:30:55 +0000
commit7f998eba8ae7e97c40112a8260ed76550c570c52 (patch)
tree4ffc13dae6568ffc6990617360935de11a4d46cc /chrome/test
parentf3f8eaaa0439b4a3d611b1efccfb89a4e8ac53b1 (diff)
downloadchromium_src-7f998eba8ae7e97c40112a8260ed76550c570c52.zip
chromium_src-7f998eba8ae7e97c40112a8260ed76550c570c52.tar.gz
chromium_src-7f998eba8ae7e97c40112a8260ed76550c570c52.tar.bz2
Enable AutoFill when in incognito mode. The infobar will not be shown, but profiles can be manipulated in the AutoFill dialog, and the data from those profiles can be used to fill forms in an incognito window.
BUG=38009 TEST=none Review URL: http://codereview.chromium.org/1064002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41887 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/testing_profile.cc5
-rw-r--r--chrome/test/testing_profile.h13
2 files changed, 17 insertions, 1 deletions
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index 27708f2..9a5b1b9 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "base/command_line.h"
#include "base/string_util.h"
+#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/dom_ui/ntp_resource_cache.h"
#include "chrome/browser/history/history_backend.h"
@@ -229,6 +230,10 @@ void TestingProfile::CreateWebDataService(bool delete_file) {
web_data_service_->Init(GetPath());
}
+void TestingProfile::CreatePersonalDataManager() {
+ personal_data_.reset(new PersonalDataManager(this));
+}
+
void TestingProfile::BlockUntilBookmarkModelLoaded() {
DCHECK(bookmark_bar_model_.get());
if (bookmark_bar_model_->IsLoaded())
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h
index 214d70a..74d654d 100644
--- a/chrome/test/testing_profile.h
+++ b/chrome/test/testing_profile.h
@@ -21,6 +21,7 @@
#include "chrome/browser/search_engines/template_url_model.h"
#include "net/base/cookie_monster.h"
+class PersonalDataManager;
class ProfileSyncFactory;
class ProfileSyncService;
class SessionService;
@@ -63,6 +64,10 @@ class TestingProfile : public Profile {
// only matters if you're recreating the WebDataService.
void CreateWebDataService(bool delete_file);
+ // Creates the PersonalDataManager. Consequent calls will recreate the
+ // service.
+ void CreatePersonalDataManager();
+
// Destroys
// Blocks until the BookmarkModel finishes loaded. This is NOT invoked from
@@ -135,6 +140,9 @@ class TestingProfile : public Profile {
virtual WebDataService* GetWebDataServiceWithoutCreating() {
return web_data_service_.get();
}
+ virtual PersonalDataManager* GetPersonalDataManager() {
+ return personal_data_.get();
+ }
virtual PasswordStore* GetPasswordStore(ServiceAccessType access) {
return NULL;
}
@@ -155,7 +163,6 @@ class TestingProfile : public Profile {
virtual ThumbnailStore* GetThumbnailStore() { return NULL; }
virtual DownloadManager* GetDownloadManager() { return NULL; }
virtual bool HasCreatedDownloadManager() const { return false; }
- virtual PersonalDataManager* GetPersonalDataManager() { return NULL; }
virtual void InitThemes();
virtual void SetTheme(Extension* extension) {}
virtual void SetNativeTheme() {}
@@ -280,6 +287,10 @@ class TestingProfile : public Profile {
// The WebDataService. Only created if CreateWebDataService is invoked.
scoped_refptr<WebDataService> web_data_service_;
+ // The PersonalDataManager. Only created if CreatePersonalDataManager is
+ // invoked.
+ scoped_ptr<PersonalDataManager> personal_data_;
+
// The TemplateURLFetcher. Only created if CreateTemplateURLModel is invoked.
scoped_ptr<TemplateURLModel> template_url_model_;