| Index: chrome/browser/tabs/pinned_tab_service.cc
|
| ===================================================================
|
| --- chrome/browser/tabs/pinned_tab_service.cc (revision 91968)
|
| +++ chrome/browser/tabs/pinned_tab_service.cc (working copy)
|
| @@ -8,8 +8,8 @@
|
| #include "chrome/browser/tabs/pinned_tab_codec.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "content/common/notification_service.h"
|
| -#include "content/common/notification_type.h"
|
|
|
| static bool IsLastNormalBrowser(Browser* browser) {
|
| for (BrowserList::const_iterator i = BrowserList::begin();
|
| @@ -26,22 +26,22 @@
|
| : profile_(profile),
|
| got_exiting_(false),
|
| has_normal_browser_(false) {
|
| - registrar_.Add(this, NotificationType::BROWSER_OPENED,
|
| + registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::BROWSER_CLOSING,
|
| + registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING,
|
| NotificationService::AllSources());
|
| - registrar_.Add(this, NotificationType::APP_EXITING,
|
| + registrar_.Add(this, content::NOTIFICATION_APP_EXITING,
|
| NotificationService::AllSources());
|
| }
|
|
|
| -void PinnedTabService::Observe(NotificationType type,
|
| +void PinnedTabService::Observe(int type,
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| if (got_exiting_)
|
| return;
|
|
|
| - switch (type.value) {
|
| - case NotificationType::BROWSER_OPENED: {
|
| + switch (type) {
|
| + case chrome::NOTIFICATION_BROWSER_OPENED: {
|
| Browser* browser = Source<Browser>(source).ptr();
|
| if (!has_normal_browser_ && browser->is_type_tabbed() &&
|
| browser->profile() == profile_) {
|
| @@ -50,7 +50,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::BROWSER_CLOSING: {
|
| + case chrome::NOTIFICATION_BROWSER_CLOSING: {
|
| Browser* browser = Source<Browser>(source).ptr();
|
| if (has_normal_browser_ && browser->profile() == profile_) {
|
| if (*(Details<bool>(details)).ptr()) {
|
| @@ -63,7 +63,7 @@
|
| break;
|
| }
|
|
|
| - case NotificationType::APP_EXITING: {
|
| + case content::NOTIFICATION_APP_EXITING: {
|
| if (has_normal_browser_)
|
| GotExit();
|
| break;
|
|
|