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

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

Issue 2268313003: Improvement of password manager logging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test 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 | « no previous file | components/autofill/core/common/save_password_progress_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/common/save_password_progress_logger.h
diff --git a/components/autofill/core/common/save_password_progress_logger.h b/components/autofill/core/common/save_password_progress_logger.h
index 339735f24c00b918daf282d155ff1896f6a445c4..6fc53ddaa36fe5712a6a90c330ed4718f0b5e430 100644
--- a/components/autofill/core/common/save_password_progress_logger.h
+++ b/components/autofill/core/common/save_password_progress_logger.h
@@ -144,6 +144,8 @@ class SavePasswordProgressLogger {
STRING_MATCH_IN_ADDITIONAL,
STRING_USERNAME_FILLED,
STRING_PASSWORD_FILLED,
+ STRING_FORM_NAME,
+ STRING_FIELDS,
STRING_INVALID, // Represents a string returned in a case of an error.
STRING_MAX = STRING_INVALID
};
@@ -170,16 +172,23 @@ class SavePasswordProgressLogger {
// Converts |log| and its |label| to a string and calls SendLog on the result.
void LogValue(StringID label, const base::Value& log);
- // Replaces all characters satisfying IsUnwantedInElementID with a ' ', and
- // lowercases all characters. This damages some valid HTML element IDs
- // or names, but it is likely that it will be still possible to match the
- // scrubbed string to the original ID or name in the HTML doc. That's good
- // enough for the logging purposes, and provides some security benefits.
+ // Replaces all characters satisfying IsUnwantedInElementID with a ' '.
+ // This damages some valid HTML element IDs or names, but it is likely that it
+ // will be still possible to match the scrubbed string to the original ID or
+ // name in the HTML doc. That's good enough for the logging purposes, and
+ // provides some security benefits.
static std::string ScrubElementID(const base::string16& element_id);
+ // The UTF-8 version of the function above.
+ static std::string ScrubElementID(std::string element_id);
+
// Translates the StringID values into the corresponding strings.
static std::string GetStringFromID(SavePasswordProgressLogger::StringID id);
+ // Removes privacy sensitive parts of |url| (currently all but host and
+ // scheme).
+ static std::string ScrubURL(const GURL& url);
+
private:
DISALLOW_COPY_AND_ASSIGN(SavePasswordProgressLogger);
};
« no previous file with comments | « no previous file | components/autofill/core/common/save_password_progress_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698