summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-01 18:16:56 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-01 18:16:56 +0000
commitbfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch)
tree70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/importer
parenta814d863440f0a154a7299f2d8b440f405c7700e (diff)
downloadchromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip
chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz
chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rwxr-xr-xchrome/browser/importer/importer.cc17
-rw-r--r--chrome/browser/importer/importer.h2
2 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index 6e68c98..33be3f2 100755
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/gfx/favicon_size.h"
#include "chrome/common/l10n_util.h"
+#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/win_util.h"
@@ -54,7 +55,7 @@ void ProfileWriter::AddTemplateURLModelObserver(
NotificationObserver* observer) {
TemplateURLModel* model = profile_->GetTemplateURLModel();
NotificationService::current()->AddObserver(
- observer, TEMPLATE_URL_MODEL_LOADED,
+ observer, NotificationType::TEMPLATE_URL_MODEL_LOADED,
Source<TemplateURLModel>(model));
model->Load();
}
@@ -290,7 +291,7 @@ void ProfileWriter::ShowBookmarkBar() {
prefs->ScheduleSavePersistentPrefs(g_browser_process->file_thread());
Source<Profile> source(profile_);
NotificationService::current()->Notify(
- NOTIFY_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, source,
+ NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, source,
NotificationService::NoDetails());
}
}
@@ -421,7 +422,8 @@ ImporterHost::ImporterHost(MessageLoop* file_loop)
ImporterHost::~ImporterHost() {
STLDeleteContainerPointers(source_profiles_.begin(), source_profiles_.end());
- if (NULL != importer_) importer_->Release();
+ if (NULL != importer_)
+ importer_->Release();
}
void ImporterHost::Loaded(BookmarkModel* model) {
@@ -433,21 +435,22 @@ void ImporterHost::Loaded(BookmarkModel* model) {
void ImporterHost::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == TEMPLATE_URL_MODEL_LOADED);
+ DCHECK(type == NotificationType::TEMPLATE_URL_MODEL_LOADED);
TemplateURLModel* model = Source<TemplateURLModel>(source).ptr();
NotificationService::current()->RemoveObserver(
- this, TEMPLATE_URL_MODEL_LOADED,
+ this, NotificationType::TEMPLATE_URL_MODEL_LOADED,
Source<TemplateURLModel>(model));
waiting_for_template_url_model_ = false;
InvokeTaskIfDone();
}
void ImporterHost::ShowWarningDialog() {
- if (headless_)
+ if (headless_) {
OnLockViewEnd(false);
- else
+ } else {
views::Window::CreateChromeWindow(GetActiveWindow(), gfx::Rect(),
new ImporterLockView(this))->Show();
+ }
}
void ImporterHost::OnLockViewEnd(bool is_continue) {
diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h
index a94047d..ee5ac37 100644
--- a/chrome/browser/importer/importer.h
+++ b/chrome/browser/importer/importer.h
@@ -20,7 +20,7 @@
#endif
#include "chrome/browser/profile.h"
#include "chrome/browser/search_engines/template_url.h"
-#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_observer.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/password_form.h"