| Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/ntp/new_tab_ui.cc (revision 91771)
|
| +++ chrome/browser/ui/webui/ntp/new_tab_ui.cc (working copy)
|
| @@ -40,6 +40,7 @@
|
| #include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
|
| #include "chrome/browser/ui/webui/ntp/value_helper.h"
|
| #include "chrome/browser/ui/webui/theme_source.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -266,7 +267,7 @@
|
| NOTREACHED();
|
| }
|
| NotificationService::current()->Notify(
|
| - NotificationType::METRIC_EVENT_DURATION,
|
| + chrome::METRIC_EVENT_DURATION,
|
| Source<TabContents>(tab),
|
| Details<MetricEventDurationDetails>(&details));
|
| }
|
| @@ -339,7 +340,7 @@
|
| const ListValue* args) {
|
| web_ui_->GetProfile()->GetPrefs()->SetBoolean(prefs::kNTPPromoClosed, true);
|
| NotificationService* service = NotificationService::current();
|
| - service->Notify(NotificationType::PROMO_RESOURCE_STATE_CHANGED,
|
| + service->Notify(chrome::PROMO_RESOURCE_STATE_CHANGED,
|
| Source<NewTabPageClosePromoHandler>(this),
|
| NotificationService::NoDetails());
|
| }
|
| @@ -409,11 +410,11 @@
|
| contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
|
|
|
| // Listen for theme installation.
|
| - registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
|
| + registrar_.Add(this, chrome::BROWSER_THEME_CHANGED,
|
| Source<ThemeService>(
|
| ThemeServiceFactory::GetForProfile(GetProfile())));
|
| // Listen for bookmark bar visibility changes.
|
| - registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
|
| + registrar_.Add(this, chrome::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
|
| NotificationService::AllSources());
|
| }
|
|
|
| @@ -431,7 +432,7 @@
|
| base::TimeDelta load_time = last_paint_ - start_;
|
| int load_time_ms = static_cast<int>(load_time.InMilliseconds());
|
| NotificationService::current()->Notify(
|
| - NotificationType::INITIAL_NEW_TAB_UI_LOAD,
|
| + chrome::INITIAL_NEW_TAB_UI_LOAD,
|
| NotificationService::AllSources(),
|
| Details<int>(&load_time_ms));
|
| UMA_HISTOGRAM_TIMES("NewTabUI load", load_time);
|
| @@ -465,7 +466,7 @@
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| switch (type.value) {
|
| - case NotificationType::BROWSER_THEME_CHANGED: {
|
| + case chrome::BROWSER_THEME_CHANGED: {
|
| InitializeCSSCaches();
|
| ListValue args;
|
| args.Append(Value::CreateStringValue(
|
| @@ -475,7 +476,7 @@
|
| CallJavascriptFunction("themeChanged", args);
|
| break;
|
| }
|
| - case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: {
|
| + case chrome::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: {
|
| if (GetProfile()->GetPrefs()->IsManagedPreference(
|
| prefs::kEnableBookmarkBar)) {
|
| break;
|
|
|