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

Unified Diff: components/autofill/core/common/save_password_progress_logger.cc

Issue 2293443002: Implement logging of the Credential Manager API calls to chrome://password-manager-internals. (Closed)
Patch Set: nits 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
Index: components/autofill/core/common/save_password_progress_logger.cc
diff --git a/components/autofill/core/common/save_password_progress_logger.cc b/components/autofill/core/common/save_password_progress_logger.cc
index 7c2ab4f1a070ff2b418d96c8f6f79a0c634ceaf0..5a5fe7681c2b4ba8c802f8ac84132de4e72996b3 100644
--- a/components/autofill/core/common/save_password_progress_logger.cc
+++ b/components/autofill/core/common/save_password_progress_logger.cc
@@ -122,6 +122,13 @@ void SavePasswordProgressLogger::LogMessage(
LogValue(STRING_MESSAGE, StringValue(GetStringFromID(message)));
}
+// static
+std::string SavePasswordProgressLogger::ScrubURL(const GURL& url) {
+ if (url.is_valid())
+ return url.GetWithEmptyPath().spec();
+ return std::string();
+}
+
void SavePasswordProgressLogger::LogValue(StringID label, const Value& log) {
std::string log_string;
bool conversion_to_string_successful = base::JSONWriter::WriteWithOptions(
@@ -143,13 +150,6 @@ std::string SavePasswordProgressLogger::ScrubElementID(std::string element_id) {
return element_id;
}
-// Static
-std::string SavePasswordProgressLogger::ScrubURL(const GURL& url) {
- if (url.is_valid())
- return url.GetWithEmptyPath().spec();
- return std::string();
-}
-
// Note 1: Caching the ID->string map in an array would be probably faster, but
// the switch statement is (a) robust against re-ordering, and (b) checks in
// compile-time, that all IDs get a string assigned. The expected frequency of

Powered by Google App Engine
This is Rietveld 408576698