| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4969 } else { | 4969 } else { |
| 4970 ProfileSyncService* service = sync_waiter_->service(); | 4970 ProfileSyncService* service = sync_waiter_->service(); |
| 4971 ProfileSyncService::Status status = sync_waiter_->GetStatus(); | 4971 ProfileSyncService::Status status = sync_waiter_->GetStatus(); |
| 4972 sync_info->SetString("summary", | 4972 sync_info->SetString("summary", |
| 4973 ProfileSyncService::BuildSyncStatusSummaryText(status.summary)); | 4973 ProfileSyncService::BuildSyncStatusSummaryText(status.summary)); |
| 4974 sync_info->SetString("sync url", service->sync_service_url().host()); | 4974 sync_info->SetString("sync url", service->sync_service_url().host()); |
| 4975 sync_info->SetBoolean("authenticated", status.authenticated); | 4975 sync_info->SetBoolean("authenticated", status.authenticated); |
| 4976 sync_info->SetString("last synced", service->GetLastSyncedTimeString()); | 4976 sync_info->SetString("last synced", service->GetLastSyncedTimeString()); |
| 4977 sync_info->SetInteger("updates received", status.updates_received); | 4977 sync_info->SetInteger("updates received", status.updates_received); |
| 4978 ListValue* synced_datatype_list = new ListValue; | 4978 ListValue* synced_datatype_list = new ListValue; |
| 4979 const syncable::ModelEnumSet synced_datatypes = | 4979 const syncable::ModelTypeSet synced_datatypes = |
| 4980 service->GetPreferredDataTypes(); | 4980 service->GetPreferredDataTypes(); |
| 4981 for (syncable::ModelEnumSet::Iterator it = synced_datatypes.First(); | 4981 for (syncable::ModelTypeSet::Iterator it = synced_datatypes.First(); |
| 4982 it.Good(); it.Inc()) { | 4982 it.Good(); it.Inc()) { |
| 4983 synced_datatype_list->Append( | 4983 synced_datatype_list->Append( |
| 4984 new StringValue(syncable::ModelTypeToString(it.Get()))); | 4984 new StringValue(syncable::ModelTypeToString(it.Get()))); |
| 4985 } | 4985 } |
| 4986 sync_info->Set("synced datatypes", synced_datatype_list); | 4986 sync_info->Set("synced datatypes", synced_datatype_list); |
| 4987 } | 4987 } |
| 4988 return_value->Set("sync_info", sync_info); | 4988 return_value->Set("sync_info", sync_info); |
| 4989 reply.SendSuccess(return_value.get()); | 4989 reply.SendSuccess(return_value.get()); |
| 4990 } | 4990 } |
| 4991 | 4991 |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6660 | 6660 |
| 6661 Send(reply_message_); | 6661 Send(reply_message_); |
| 6662 redirect_query_ = 0; | 6662 redirect_query_ = 0; |
| 6663 reply_message_ = NULL; | 6663 reply_message_ = NULL; |
| 6664 } | 6664 } |
| 6665 | 6665 |
| 6666 void TestingAutomationProvider::OnRemoveProvider() { | 6666 void TestingAutomationProvider::OnRemoveProvider() { |
| 6667 if (g_browser_process) | 6667 if (g_browser_process) |
| 6668 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6668 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6669 } | 6669 } |
| OLD | NEW |