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

Unified Diff: components/signin/core/browser/about_signin_internals.cc

Issue 249523002: Add extra column to details of signin-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pretty up the HTML table and the variable names. Created 6 years, 8 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 | « chrome/browser/resources/signin_internals/signin_index.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/about_signin_internals.cc
diff --git a/components/signin/core/browser/about_signin_internals.cc b/components/signin/core/browser/about_signin_internals.cc
index 8fd03865e5c9d8f043453e16f330ddda7115d8ba..4388838d7983d44362712677766ae69b3a22f3a3 100644
--- a/components/signin/core/browser/about_signin_internals.cc
+++ b/components/signin/core/browser/about_signin_internals.cc
@@ -42,10 +42,12 @@ base::ListValue* AddSection(base::ListValue* parent_list,
void AddSectionEntry(base::ListValue* section_list,
const std::string& field_name,
- const std::string& field_val) {
+ const std::string& field_status,
+ const std::string& field_time = "") {
scoped_ptr<base::DictionaryValue> entry(new base::DictionaryValue());
entry->SetString("label", field_name);
- entry->SetString("value", field_val);
+ entry->SetString("status", field_status);
+ entry->SetString("time", field_time);
section_list->Append(entry.release());
}
@@ -61,32 +63,26 @@ std::string SigninStatusFieldToLabel(UntimedSigninStatusField field) {
return std::string();
}
-TimedSigninStatusValue SigninStatusFieldToLabel(TimedSigninStatusField field) {
+std::string SigninStatusFieldToLabel(TimedSigninStatusField field) {
switch (field) {
case SIGNIN_TYPE:
- return TimedSigninStatusValue("Type", "Time");
+ return "Type";
case CLIENT_LOGIN_STATUS:
- return TimedSigninStatusValue("Last OnClientLogin Status",
- "Last OnClientLogin Time");
+ return "Last OnClientLogin Status";
case OAUTH_LOGIN_STATUS:
- return TimedSigninStatusValue("Last OnOAuthLogin Status",
- "Last OnOAuthLogin Time");
-
+ return "Last OnOAuthLogin Status";
case GET_USER_INFO_STATUS:
- return TimedSigninStatusValue("Last OnGetUserInfo Status",
- "Last OnGetUserInfo Time");
+ return "Last OnGetUserInfo Status";
case UBER_TOKEN_STATUS:
- return TimedSigninStatusValue("Last OnUberToken Status",
- "Last OnUberToken Time");
+ return "Last OnUberToken Status";
case MERGE_SESSION_STATUS:
- return TimedSigninStatusValue("Last OnMergeSession Status",
- "Last OnMergeSession Time");
+ return "Last OnMergeSession Status";
case TIMED_FIELDS_END:
NOTREACHED();
- return TimedSigninStatusValue("Error", std::string());
+ return "Error";
}
NOTREACHED();
- return TimedSigninStatusValue("Error", std::string());
+ return "Error";
}
} // anonymous namespace
@@ -370,16 +366,12 @@ scoped_ptr<base::DictionaryValue> AboutSigninInternals::SigninStatus::ToValue(
base::ListValue* detailed_info =
AddSection(signin_info, "Last Signin Details");
for (int i = TIMED_FIELDS_BEGIN; i < TIMED_FIELDS_END; ++i) {
- const std::string value_field =
- SigninStatusFieldToLabel(static_cast<TimedSigninStatusField>(i)).first;
- const std::string time_field =
- SigninStatusFieldToLabel(static_cast<TimedSigninStatusField>(i)).second;
+ const std::string status_field_label =
+ SigninStatusFieldToLabel(static_cast<TimedSigninStatusField>(i));
AddSectionEntry(detailed_info,
- value_field,
- timed_signin_fields[i - TIMED_FIELDS_BEGIN].first);
- AddSectionEntry(detailed_info,
- time_field,
+ status_field_label,
+ timed_signin_fields[i - TIMED_FIELDS_BEGIN].first,
timed_signin_fields[i - TIMED_FIELDS_BEGIN].second);
}
« no previous file with comments | « chrome/browser/resources/signin_internals/signin_index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698