Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / services / gcm / gcm_client_mock.cc
index 3292f3f..b894efa 100644 (file)
 
 namespace gcm {
 
-GCMClientMock::GCMClientMock(LoadingDelay loading_delay,
-                             ErrorSimulation error_simulation)
+GCMClientMock::GCMClientMock(LoadingDelay loading_delay)
     : delegate_(NULL),
       status_(UNINITIALIZED),
       loading_delay_(loading_delay),
-      error_simulation_(error_simulation),
       weak_ptr_factory_(this) {
 }
 
@@ -67,10 +65,7 @@ void GCMClientMock::Register(const std::string& app_id,
                              const std::vector<std::string>& sender_ids) {
   DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
 
-  std::string registration_id;
-  if (error_simulation_ == ALWAYS_SUCCEED)
-    registration_id = GetRegistrationIdFromSenderIds(sender_ids);
-
+  std::string registration_id = GetRegistrationIdFromSenderIds(sender_ids);
   base::MessageLoop::current()->PostTask(
       FROM_HERE,
       base::Bind(&GCMClientMock::RegisterFinished,
@@ -102,6 +97,12 @@ void GCMClientMock::Send(const std::string& app_id,
                  message));
 }
 
+void GCMClientMock::SetRecording(bool recording) {
+}
+
+void GCMClientMock::ClearActivityLogs() {
+}
+
 GCMClient::GCMStatistics GCMClientMock::GetStatistics() const {
   return GCMClient::GCMStatistics();
 }
@@ -142,7 +143,7 @@ void GCMClientMock::DeleteMessages(const std::string& app_id) {
 // static
 std::string GCMClientMock::GetRegistrationIdFromSenderIds(
     const std::vector<std::string>& sender_ids) {
-  // GCMProfileService normalizes the sender IDs by making them sorted.
+  // GCMService normalizes the sender IDs by making them sorted.
   std::vector<std::string> normalized_sender_ids = sender_ids;
   std::sort(normalized_sender_ids.begin(), normalized_sender_ids.end());