Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 8851006: [Sync] Replace all instances of ModelTypeSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup pass #2 Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/backend_migrator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4944 matching lines...) Expand 10 before | Expand all | Expand 10 after
4955 } else { 4955 } else {
4956 ProfileSyncService* service = sync_waiter_->service(); 4956 ProfileSyncService* service = sync_waiter_->service();
4957 ProfileSyncService::Status status = sync_waiter_->GetStatus(); 4957 ProfileSyncService::Status status = sync_waiter_->GetStatus();
4958 sync_info->SetString("summary", 4958 sync_info->SetString("summary",
4959 ProfileSyncService::BuildSyncStatusSummaryText(status.summary)); 4959 ProfileSyncService::BuildSyncStatusSummaryText(status.summary));
4960 sync_info->SetString("sync url", service->sync_service_url().host()); 4960 sync_info->SetString("sync url", service->sync_service_url().host());
4961 sync_info->SetBoolean("authenticated", status.authenticated); 4961 sync_info->SetBoolean("authenticated", status.authenticated);
4962 sync_info->SetString("last synced", service->GetLastSyncedTimeString()); 4962 sync_info->SetString("last synced", service->GetLastSyncedTimeString());
4963 sync_info->SetInteger("updates received", status.updates_received); 4963 sync_info->SetInteger("updates received", status.updates_received);
4964 ListValue* synced_datatype_list = new ListValue; 4964 ListValue* synced_datatype_list = new ListValue;
4965 syncable::ModelTypeSet synced_datatypes; 4965 const syncable::ModelEnumSet synced_datatypes =
4966 service->GetPreferredDataTypes(&synced_datatypes); 4966 service->GetPreferredDataTypes();
4967 for (syncable::ModelTypeSet::iterator it = synced_datatypes.begin(); 4967 for (syncable::ModelEnumSet::Iterator it = synced_datatypes.First();
4968 it != synced_datatypes.end(); ++it) { 4968 it.Good(); it.Inc()) {
4969 synced_datatype_list->Append( 4969 synced_datatype_list->Append(
4970 new StringValue(syncable::ModelTypeToString(*it))); 4970 new StringValue(syncable::ModelTypeToString(it.Get())));
4971 } 4971 }
4972 sync_info->Set("synced datatypes", synced_datatype_list); 4972 sync_info->Set("synced datatypes", synced_datatype_list);
4973 } 4973 }
4974 return_value->Set("sync_info", sync_info); 4974 return_value->Set("sync_info", sync_info);
4975 reply.SendSuccess(return_value.get()); 4975 reply.SendSuccess(return_value.get());
4976 } 4976 }
4977 4977
4978 // Sample json output: { "success": true } 4978 // Sample json output: { "success": true }
4979 void TestingAutomationProvider::AwaitFullSyncCompletion( 4979 void TestingAutomationProvider::AwaitFullSyncCompletion(
4980 Browser* browser, 4980 Browser* browser,
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
6646 6646
6647 Send(reply_message_); 6647 Send(reply_message_);
6648 redirect_query_ = 0; 6648 redirect_query_ = 0;
6649 reply_message_ = NULL; 6649 reply_message_ = NULL;
6650 } 6650 }
6651 6651
6652 void TestingAutomationProvider::OnRemoveProvider() { 6652 void TestingAutomationProvider::OnRemoveProvider() {
6653 if (g_browser_process) 6653 if (g_browser_process)
6654 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6654 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6655 } 6655 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/backend_migrator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698