| OLD | NEW | 
|    1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2010 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 "chrome/browser/sync/notifier/server_notifier_thread.h" |    5 #include "chrome/browser/sync/notifier/server_notifier_thread.h" | 
|    6  |    6  | 
|    7 #include <string> |    7 #include <string> | 
|    8 #include <vector> |    8 #include <vector> | 
|    9  |    9  | 
|   10 #include "base/logging.h" |   10 #include "base/logging.h" | 
|   11 #include "chrome/browser/sync/notifier/chrome_invalidation_client.h" |   11 #include "chrome/browser/sync/notifier/chrome_invalidation_client.h" | 
|   12 #include "chrome/common/net/notifier/listener/notification_defines.h" |   12 #include "jingle/notifier/listener/notification_defines.h" | 
|   13  |   13  | 
|   14 namespace sync_notifier { |   14 namespace sync_notifier { | 
|   15  |   15  | 
|   16 ServerNotifierThread::ServerNotifierThread() {} |   16 ServerNotifierThread::ServerNotifierThread() {} | 
|   17  |   17  | 
|   18 ServerNotifierThread::~ServerNotifierThread() {} |   18 ServerNotifierThread::~ServerNotifierThread() {} | 
|   19  |   19  | 
|   20 void ServerNotifierThread::ListenForUpdates() { |   20 void ServerNotifierThread::ListenForUpdates() { | 
|   21   DCHECK_EQ(MessageLoop::current(), parent_message_loop_); |   21   DCHECK_EQ(MessageLoop::current(), parent_message_loop_); | 
|   22   worker_message_loop()->PostTask( |   22   worker_message_loop()->PostTask( | 
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  110     delegate_->OnIncomingNotification(notification_data); |  110     delegate_->OnIncomingNotification(notification_data); | 
|  111   } |  111   } | 
|  112 } |  112 } | 
|  113  |  113  | 
|  114 void ServerNotifierThread::StopInvalidationListener() { |  114 void ServerNotifierThread::StopInvalidationListener() { | 
|  115   DCHECK_EQ(MessageLoop::current(), worker_message_loop()); |  115   DCHECK_EQ(MessageLoop::current(), worker_message_loop()); | 
|  116   chrome_invalidation_client_.reset(); |  116   chrome_invalidation_client_.reset(); | 
|  117 } |  117 } | 
|  118  |  118  | 
|  119 }  // namespace sync_notifier |  119 }  // namespace sync_notifier | 
| OLD | NEW |