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

Unified Diff: components/sync/driver/about_sync_util.cc

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/about_sync_util.h ('k') | components/sync/driver/about_sync_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/about_sync_util.cc
diff --git a/components/sync_driver/about_sync_util.cc b/components/sync/driver/about_sync_util.cc
similarity index 89%
rename from components/sync_driver/about_sync_util.cc
rename to components/sync/driver/about_sync_util.cc
index 812e17cf3cd21db2710e98a32ebdeff8a198bb3f..fbf96ef6cd60da753434825cedc5f55b53556ad5 100644
--- a/components/sync_driver/about_sync_util.cc
+++ b/components/sync/driver/about_sync_util.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/sync_driver/about_sync_util.h"
+#include "components/sync/driver/about_sync_util.h"
#include <string>
#include <utility>
@@ -14,10 +14,10 @@
#include "components/signin/core/browser/signin_manager_base.h"
#include "components/sync/api/time.h"
#include "components/sync/base/sync_string_conversions.h"
+#include "components/sync/driver/sync_service.h"
#include "components/sync/engine/sync_status.h"
#include "components/sync/protocol/proto_enum_conversions.h"
#include "components/sync/sessions/sync_session_snapshot.h"
-#include "components/sync_driver/sync_service.h"
#include "components/version_info/version_info.h"
using base::DictionaryValue;
@@ -274,12 +274,10 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
StringSyncStat receive_token_time(section_credentials, "Received Token");
StringSyncStat token_request_status(section_credentials,
"Token Request Status");
- StringSyncStat next_token_request(section_credentials,
- "Next Token Request");
+ StringSyncStat next_token_request(section_credentials, "Next Token Request");
base::ListValue* section_local = AddSection(stats_list, "Local State");
- StringSyncStat server_connection(section_local,
- "Server Connection");
+ StringSyncStat server_connection(section_local, "Server Connection");
StringSyncStat last_synced(section_local, "Last Synced");
BoolSyncStat is_setup_complete(section_local,
"Sync First-Time Setup Complete");
@@ -306,13 +304,11 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
BoolSyncStat has_keystore_key(section_encryption, "Has Keystore Key");
StringSyncStat keystore_migration_time(section_encryption,
"Keystore Migration Time");
- StringSyncStat passphrase_type(section_encryption,
- "Passphrase Type");
- StringSyncStat passphrase_time(section_encryption,
- "Passphrase Time");
+ StringSyncStat passphrase_type(section_encryption, "Passphrase Type");
+ StringSyncStat passphrase_time(section_encryption, "Passphrase Time");
- base::ListValue* section_last_session = AddSection(
- stats_list, "Status from Last Completed Session");
+ base::ListValue* section_last_session =
+ AddSection(stats_list, "Status from Last Completed Session");
StringSyncStat session_source(section_last_session, "Sync Source");
StringSyncStat get_key_result(section_last_session, "GetKey Step Result");
StringSyncStat download_result(section_last_session, "Download Step Result");
@@ -326,12 +322,12 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
IntSyncStat reflected_updates(section_counters, "Reflected Updates");
IntSyncStat successful_commits(section_counters, "Successful Commits");
IntSyncStat conflicts_resolved_local_wins(section_counters,
- "Conflicts Resolved: Client Wins");
+ "Conflicts Resolved: Client Wins");
IntSyncStat conflicts_resolved_server_wins(section_counters,
- "Conflicts Resolved: Server Wins");
+ "Conflicts Resolved: Server Wins");
- base::ListValue *section_this_cycle = AddSection(stats_list,
- "Transient Counters (this cycle)");
+ base::ListValue* section_this_cycle =
+ AddSection(stats_list, "Transient Counters (this cycle)");
IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts");
IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts");
IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts");
@@ -343,10 +339,10 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
IntSyncStat committed_count(section_that_cycle, "Committed Count");
IntSyncStat entries(section_that_cycle, "Entries");
- base::ListValue* section_nudge_info = AddSection(
- stats_list, "Nudge Source Counters");
- IntSyncStat nudge_source_notification(
- section_nudge_info, "Server Invalidations");
+ base::ListValue* section_nudge_info =
+ AddSection(stats_list, "Nudge Source Counters");
+ IntSyncStat nudge_source_notification(section_nudge_info,
+ "Server Invalidations");
IntSyncStat nudge_source_local(section_nudge_info, "Local Changes");
IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes");
@@ -383,10 +379,10 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
const sync_driver::SyncService::SyncTokenStatus& token_status =
service->GetSyncTokenStatus();
server_connection.SetValue(GetConnectionStatus(token_status));
- request_token_time.SetValue(GetTimeStr(token_status.token_request_time,
- "n/a"));
- receive_token_time.SetValue(GetTimeStr(token_status.token_receive_time,
- "n/a"));
+ request_token_time.SetValue(
+ GetTimeStr(token_status.token_request_time, "n/a"));
+ receive_token_time.SetValue(
+ GetTimeStr(token_status.token_receive_time, "n/a"));
std::string err = token_status.last_get_token_error.error_message();
token_request_status.SetValue(err.empty() ? "OK" : err);
next_token_request.SetValue(
@@ -399,14 +395,13 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
if (is_status_valid) {
is_syncing.SetValue(full_status.syncing);
retry_time.SetValue(GetTimeStr(full_status.retry_time,
- "Scheduler is not in backoff or throttled"));
+ "Scheduler is not in backoff or throttled"));
}
if (snapshot.is_initialized())
is_throttled.SetValue(snapshot.is_silenced());
if (is_status_valid) {
- are_notifications_enabled.SetValue(
- full_status.notifications_enabled);
+ are_notifications_enabled.SetValue(full_status.notifications_enabled);
}
if (sync_active) {
@@ -419,8 +414,7 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
if (is_status_valid) {
is_cryptographer_ready.SetValue(full_status.cryptographer_ready);
has_pending_keys.SetValue(full_status.crypto_has_pending_keys);
- encrypted_types.SetValue(
- ModelTypeSetToString(full_status.encrypted_types));
+ encrypted_types.SetValue(ModelTypeSetToString(full_status.encrypted_types));
has_keystore_key.SetValue(full_status.has_keystore_key);
keystore_migration_time.SetValue(
GetTimeStr(full_status.keystore_migration_time, "Not Migrated"));
@@ -434,15 +428,12 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
session_source.SetValue(
syncer::GetUpdatesSourceString(snapshot.legacy_updates_source()));
}
- get_key_result.SetValue(
- GetSyncerErrorString(
- snapshot.model_neutral_state().last_get_key_result));
- download_result.SetValue(
- GetSyncerErrorString(
- snapshot.model_neutral_state().last_download_updates_result));
+ get_key_result.SetValue(GetSyncerErrorString(
+ snapshot.model_neutral_state().last_get_key_result));
+ download_result.SetValue(GetSyncerErrorString(
+ snapshot.model_neutral_state().last_download_updates_result));
commit_result.SetValue(
- GetSyncerErrorString(
- snapshot.model_neutral_state().commit_result));
+ GetSyncerErrorString(snapshot.model_neutral_state().commit_result));
}
if (is_status_valid) {
@@ -504,9 +495,9 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
if (actionable_error_detected) {
error_type.SetValue(syncer::GetSyncErrorTypeString(
- full_status.sync_protocol_error.error_type));
- action.SetValue(syncer::GetClientActionString(
- full_status.sync_protocol_error.action));
+ full_status.sync_protocol_error.error_type));
+ action.SetValue(
+ syncer::GetClientActionString(full_status.sync_protocol_error.action));
url.SetValue(full_status.sync_protocol_error.url);
description.SetValue(full_status.sync_protocol_error.error_description);
}
@@ -519,10 +510,10 @@ std::unique_ptr<base::DictionaryValue> ConstructAboutInformation(
std::string location_str;
loc.Write(true, true, &location_str);
std::string unrecoverable_error_message =
- "Unrecoverable error detected at " + location_str +
- ": " + service->unrecoverable_error_message();
+ "Unrecoverable error detected at " + location_str + ": " +
+ service->unrecoverable_error_message();
about_info->SetString("unrecoverable_error_message",
- unrecoverable_error_message);
+ unrecoverable_error_message);
}
about_info->Set("type_status", service->GetTypeStatusMap());
« no previous file with comments | « components/sync/driver/about_sync_util.h ('k') | components/sync/driver/about_sync_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698