| Index: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
|
| diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
|
| index 6b5726191be778baeedb8a85aed76a937082faef..fc68261c0b548b4ef884d2edf09eb0c38a7db00b 100644
|
| --- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
|
| +++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
|
| @@ -127,7 +127,7 @@ class FakeExtensionGCMAppHandler : public ExtensionGCMAppHandler {
|
| FakeExtensionGCMAppHandler(Profile* profile, Waiter* waiter)
|
| : ExtensionGCMAppHandler(profile),
|
| waiter_(waiter),
|
| - unregistration_result_(gcm::GCMClient::UNKNOWN_ERROR) {
|
| + unregistration_result_(gcm::RESULT_UNKNOWN_ERROR) {
|
| }
|
|
|
| virtual ~FakeExtensionGCMAppHandler() {
|
| @@ -135,7 +135,7 @@ class FakeExtensionGCMAppHandler : public ExtensionGCMAppHandler {
|
|
|
| virtual void OnMessage(
|
| const std::string& app_id,
|
| - const gcm::GCMClient::IncomingMessage& message) OVERRIDE {
|
| + const gcm::IncomingMessage& message) OVERRIDE {
|
| }
|
|
|
| virtual void OnMessagesDeleted(const std::string& app_id) OVERRIDE {
|
| @@ -143,22 +143,22 @@ class FakeExtensionGCMAppHandler : public ExtensionGCMAppHandler {
|
|
|
| virtual void OnSendError(
|
| const std::string& app_id,
|
| - const gcm::GCMClient::SendErrorDetails& send_error_details) OVERRIDE {
|
| + const gcm::SendErrorDetails& send_error_details) OVERRIDE {
|
| }
|
|
|
| virtual void OnUnregisterCompleted(const std::string& app_id,
|
| - gcm::GCMClient::Result result) OVERRIDE {
|
| + gcm::Result result) OVERRIDE {
|
| unregistration_result_ = result;
|
| waiter_->SignalCompleted();
|
| }
|
|
|
| - gcm::GCMClient::Result unregistration_result() const {
|
| + gcm::Result unregistration_result() const {
|
| return unregistration_result_;
|
| }
|
|
|
| private:
|
| Waiter* waiter_;
|
| - gcm::GCMClient::Result unregistration_result_;
|
| + gcm::Result unregistration_result_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeExtensionGCMAppHandler);
|
| };
|
| @@ -172,8 +172,8 @@ class ExtensionGCMAppHandlerTest : public testing::Test {
|
|
|
| ExtensionGCMAppHandlerTest()
|
| : extension_service_(NULL),
|
| - registration_result_(gcm::GCMClient::UNKNOWN_ERROR),
|
| - unregistration_result_(gcm::GCMClient::UNKNOWN_ERROR) {
|
| + registration_result_(gcm::RESULT_UNKNOWN_ERROR),
|
| + unregistration_result_(gcm::RESULT_UNKNOWN_ERROR) {
|
| }
|
|
|
| virtual ~ExtensionGCMAppHandlerTest() {
|
| @@ -296,7 +296,7 @@ class ExtensionGCMAppHandlerTest : public testing::Test {
|
| }
|
|
|
| void RegisterCompleted(const std::string& registration_id,
|
| - gcm::GCMClient::Result result) {
|
| + gcm::Result result) {
|
| registration_result_ = result;
|
| waiter_.SignalCompleted();
|
| }
|
| @@ -314,10 +314,10 @@ class ExtensionGCMAppHandlerTest : public testing::Test {
|
| FakeExtensionGCMAppHandler* gcm_app_handler() const {
|
| return gcm_app_handler_.get();
|
| }
|
| - gcm::GCMClient::Result registration_result() const {
|
| + gcm::Result registration_result() const {
|
| return registration_result_;
|
| }
|
| - gcm::GCMClient::Result unregistration_result() const {
|
| + gcm::Result unregistration_result() const {
|
| return unregistration_result_;
|
| }
|
|
|
| @@ -336,8 +336,8 @@ class ExtensionGCMAppHandlerTest : public testing::Test {
|
|
|
| Waiter waiter_;
|
| scoped_ptr<FakeExtensionGCMAppHandler> gcm_app_handler_;
|
| - gcm::GCMClient::Result registration_result_;
|
| - gcm::GCMClient::Result unregistration_result_;
|
| + gcm::Result registration_result_;
|
| + gcm::Result unregistration_result_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandlerTest);
|
| };
|
| @@ -378,12 +378,12 @@ TEST_F(ExtensionGCMAppHandlerTest, UnregisterOnExtensionUninstall) {
|
| sender_ids.push_back("sender1");
|
| Register(extension->id(), sender_ids);
|
| waiter()->WaitUntilCompleted();
|
| - EXPECT_EQ(gcm::GCMClient::SUCCESS, registration_result());
|
| + EXPECT_EQ(gcm::RESULT_SUCCESS, registration_result());
|
|
|
| // Unregistration should be triggered when the extension is uninstalled.
|
| UninstallExtension(extension);
|
| waiter()->WaitUntilCompleted();
|
| - EXPECT_EQ(gcm::GCMClient::SUCCESS,
|
| + EXPECT_EQ(gcm::RESULT_SUCCESS,
|
| gcm_app_handler()->unregistration_result());
|
| }
|
|
|
|
|