summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 23:17:07 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 23:17:07 +0000
commitad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch)
tree3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome/browser/autofill
parent75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff)
downloadchromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip
chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz
chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716 Review URL: http://codereview.chromium.org/8342048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc3
-rw-r--r--chrome/browser/autofill/autofill_manager.cc14
2 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index e1796ac..6dda02b 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -28,6 +28,7 @@
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/test/test_url_fetcher_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
@@ -667,7 +668,7 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillAfterTranslate) {
ui_test_utils::WindowedNotificationObserver translation_observer(
chrome::NOTIFICATION_PAGE_TRANSLATED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
// Simulate translation to kick onTranslateElementLoad.
// But right now, the call stucks here.
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 21c2597..fe3d6ba 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -43,7 +43,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
@@ -567,18 +567,18 @@ void AutofillManager::OnShowAutofillDialog() {
}
void AutofillManager::OnDidPreviewAutofillFormData() {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
content::Source<RenderViewHost>(tab_contents()->render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
content::Source<RenderViewHost>(tab_contents()->render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
metric_logger_->LogUserHappinessMetric(AutofillMetrics::USER_DID_AUTOFILL);
if (!user_did_autofill_) {
@@ -591,10 +591,10 @@ void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) {
}
void AutofillManager::OnDidShowAutofillSuggestions(bool is_new_popup) {
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS,
content::Source<RenderViewHost>(tab_contents()->render_view_host()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
if (is_new_popup) {
metric_logger_->LogUserHappinessMetric(AutofillMetrics::SUGGESTIONS_SHOWN);