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

Unified Diff: components/safe_browsing/password_protection/password_protection_request.cc

Issue 2912383004: Fill is_chrome_signin_password field in the password entry pings. (Closed)
Patch Set: clean up DEPS file Created 3 years, 7 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/safe_browsing/password_protection/password_protection_request.cc
diff --git a/components/safe_browsing/password_protection/password_protection_request.cc b/components/safe_browsing/password_protection/password_protection_request.cc
index 182070830a26ecde68b176edd60139bbb7e28ecc..63e38cc072a79702b159a901679d3ade9c0949c2 100644
--- a/components/safe_browsing/password_protection/password_protection_request.cc
+++ b/components/safe_browsing/password_protection/password_protection_request.cc
@@ -8,11 +8,13 @@
#include "base/metrics/histogram_macros.h"
#include "components/data_use_measurement/core/data_use_user_data.h"
#include "content/public/browser/web_contents.h"
+#include "google_apis/gaia/gaia_urls.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
#include "net/base/url_util.h"
#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
+#include "url/origin.h"
using content::BrowserThread;
using content::WebContents;
@@ -124,7 +126,12 @@ void PasswordProtectionRequest::FillRequestProto() {
break;
}
case LoginReputationClientRequest::PASSWORD_REUSE_EVENT: {
- // TODO(jialiul): Fill more password reuse related information when ready.
+ LoginReputationClientRequest::PasswordReuseEvent* reuse_event =
+ request_proto_->mutable_password_reuse_event();
+ const url::Origin gaia_origin(
+ GaiaUrls::GetInstance()->gaia_url().GetOrigin());
+ reuse_event->set_is_chrome_signin_password(
Nathan Parker 2017/05/31 22:40:55 I think we want to know that this password matches
Jialiu Lin 2017/06/01 01:22:01 You're right. I overlooked this possibility. My la
+ url::Origin(GURL(saved_domain_)).IsSameOriginWith(gaia_origin));
break;
}
default:

Powered by Google App Engine
This is Rietveld 408576698