| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/tracked_objects.h" | 9 #include "base/tracked_objects.h" |
| 10 #include "chrome/browser/extensions/app_notification_manager.h" | 10 #include "chrome/browser/extensions/app_notification_manager.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 TestAppNotificationDataTypeController( | 36 TestAppNotificationDataTypeController( |
| 37 ProfileSyncComponentsFactory* profile_sync_factory, | 37 ProfileSyncComponentsFactory* profile_sync_factory, |
| 38 Profile* profile, | 38 Profile* profile, |
| 39 ProfileSyncService* sync_service) | 39 ProfileSyncService* sync_service) |
| 40 : AppNotificationDataTypeController(profile_sync_factory, | 40 : AppNotificationDataTypeController(profile_sync_factory, |
| 41 profile, | 41 profile, |
| 42 sync_service), | 42 sync_service), |
| 43 manager_(new extensions::AppNotificationManager(profile_)) { | 43 manager_(new extensions::AppNotificationManager(profile_)) { |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual extensions::AppNotificationManager* GetAppNotificationManager() { | 46 virtual extensions::AppNotificationManager* |
| 47 GetAppNotificationManager() OVERRIDE { |
| 47 return manager_.get(); | 48 return manager_.get(); |
| 48 } | 49 } |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 virtual ~TestAppNotificationDataTypeController() {} | 52 virtual ~TestAppNotificationDataTypeController() {} |
| 52 | 53 |
| 53 scoped_refptr<extensions::AppNotificationManager> manager_; | 54 scoped_refptr<extensions::AppNotificationManager> manager_; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 namespace { | 57 namespace { |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 EXPECT_TRUE(syncable_service_.syncing()); | 274 EXPECT_TRUE(syncable_service_.syncing()); |
| 274 // This should cause app_notif_dtc_->Stop() to be called. | 275 // This should cause app_notif_dtc_->Stop() to be called. |
| 275 app_notif_dtc_->OnSingleDatatypeUnrecoverableError(FROM_HERE, "Test"); | 276 app_notif_dtc_->OnSingleDatatypeUnrecoverableError(FROM_HERE, "Test"); |
| 276 PumpLoop(); | 277 PumpLoop(); |
| 277 EXPECT_EQ(DataTypeController::NOT_RUNNING, app_notif_dtc_->state()); | 278 EXPECT_EQ(DataTypeController::NOT_RUNNING, app_notif_dtc_->state()); |
| 278 EXPECT_FALSE(syncable_service_.syncing()); | 279 EXPECT_FALSE(syncable_service_.syncing()); |
| 279 } | 280 } |
| 280 | 281 |
| 281 } // namespace | 282 } // namespace |
| 282 } // namespace browser_sync | 283 } // namespace browser_sync |
| OLD | NEW |