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

Side by Side Diff: components/autofill/content/common/autofill_types_struct_traits.cc

Issue 2865233003: Use an MutationObserver to check when a password form disappears after XHR (Closed)
Patch Set: updates 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/content/common/autofill_types_struct_traits.h" 5 #include "components/autofill/content/common/autofill_types_struct_traits.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "ipc/ipc_message_utils.h" 8 #include "ipc/ipc_message_utils.h"
9 #include "mojo/common/common_custom_types_struct_traits.h" 9 #include "mojo/common/common_custom_types_struct_traits.h"
10 #include "url/mojo/origin_struct_traits.h" 10 #include "url/mojo/origin_struct_traits.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 return mojom::PasswordFormSubmissionIndicatorEvent::HTML_FORM_SUBMISSION; 254 return mojom::PasswordFormSubmissionIndicatorEvent::HTML_FORM_SUBMISSION;
255 case PasswordForm::SubmissionIndicatorEvent::SAME_DOCUMENT_NAVIGATION: 255 case PasswordForm::SubmissionIndicatorEvent::SAME_DOCUMENT_NAVIGATION:
256 return mojom::PasswordFormSubmissionIndicatorEvent:: 256 return mojom::PasswordFormSubmissionIndicatorEvent::
257 SAME_DOCUMENT_NAVIGATION; 257 SAME_DOCUMENT_NAVIGATION;
258 case PasswordForm::SubmissionIndicatorEvent::XHR_SUCCEEDED: 258 case PasswordForm::SubmissionIndicatorEvent::XHR_SUCCEEDED:
259 return mojom::PasswordFormSubmissionIndicatorEvent::XHR_SUCCEEDED; 259 return mojom::PasswordFormSubmissionIndicatorEvent::XHR_SUCCEEDED;
260 case PasswordForm::SubmissionIndicatorEvent::FRAME_DETACHED: 260 case PasswordForm::SubmissionIndicatorEvent::FRAME_DETACHED:
261 return mojom::PasswordFormSubmissionIndicatorEvent::FRAME_DETACHED; 261 return mojom::PasswordFormSubmissionIndicatorEvent::FRAME_DETACHED;
262 case PasswordForm::SubmissionIndicatorEvent::MANUAL_SAVE: 262 case PasswordForm::SubmissionIndicatorEvent::MANUAL_SAVE:
263 return mojom::PasswordFormSubmissionIndicatorEvent::MANUAL_SAVE; 263 return mojom::PasswordFormSubmissionIndicatorEvent::MANUAL_SAVE;
264 case PasswordForm::SubmissionIndicatorEvent::DOM_MUTATION_AFTER_XHR:
265 return mojom::PasswordFormSubmissionIndicatorEvent::
266 DOM_MUTATION_AFTER_XHR;
264 case PasswordForm::SubmissionIndicatorEvent:: 267 case PasswordForm::SubmissionIndicatorEvent::
265 SUBMISSION_INDICATOR_EVENT_COUNT: 268 SUBMISSION_INDICATOR_EVENT_COUNT:
266 return mojom::PasswordFormSubmissionIndicatorEvent:: 269 return mojom::PasswordFormSubmissionIndicatorEvent::
267 SUBMISSION_INDICATOR_EVENT_COUNT; 270 SUBMISSION_INDICATOR_EVENT_COUNT;
268 } 271 }
269 272
270 NOTREACHED(); 273 NOTREACHED();
271 return mojom::PasswordFormSubmissionIndicatorEvent::NONE; 274 return mojom::PasswordFormSubmissionIndicatorEvent::NONE;
272 } 275 }
273 276
(...skipping 15 matching lines...) Expand all
289 return true; 292 return true;
290 case mojom::PasswordFormSubmissionIndicatorEvent::XHR_SUCCEEDED: 293 case mojom::PasswordFormSubmissionIndicatorEvent::XHR_SUCCEEDED:
291 *output = PasswordForm::SubmissionIndicatorEvent::XHR_SUCCEEDED; 294 *output = PasswordForm::SubmissionIndicatorEvent::XHR_SUCCEEDED;
292 return true; 295 return true;
293 case mojom::PasswordFormSubmissionIndicatorEvent::FRAME_DETACHED: 296 case mojom::PasswordFormSubmissionIndicatorEvent::FRAME_DETACHED:
294 *output = PasswordForm::SubmissionIndicatorEvent::FRAME_DETACHED; 297 *output = PasswordForm::SubmissionIndicatorEvent::FRAME_DETACHED;
295 return true; 298 return true;
296 case mojom::PasswordFormSubmissionIndicatorEvent::MANUAL_SAVE: 299 case mojom::PasswordFormSubmissionIndicatorEvent::MANUAL_SAVE:
297 *output = PasswordForm::SubmissionIndicatorEvent::MANUAL_SAVE; 300 *output = PasswordForm::SubmissionIndicatorEvent::MANUAL_SAVE;
298 return true; 301 return true;
302 case mojom::PasswordFormSubmissionIndicatorEvent::DOM_MUTATION_AFTER_XHR:
303 *output = PasswordForm::SubmissionIndicatorEvent::DOM_MUTATION_AFTER_XHR;
304 return true;
299 case mojom::PasswordFormSubmissionIndicatorEvent:: 305 case mojom::PasswordFormSubmissionIndicatorEvent::
300 SUBMISSION_INDICATOR_EVENT_COUNT: 306 SUBMISSION_INDICATOR_EVENT_COUNT:
301 *output = PasswordForm::SubmissionIndicatorEvent:: 307 *output = PasswordForm::SubmissionIndicatorEvent::
302 SUBMISSION_INDICATOR_EVENT_COUNT; 308 SUBMISSION_INDICATOR_EVENT_COUNT;
303 return true; 309 return true;
304 } 310 }
305 311
306 NOTREACHED(); 312 NOTREACHED();
307 return false; 313 return false;
308 } 314 }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 // static 660 // static
655 bool StructTraits<mojom::PossibleUsernamePairDataView, PossibleUsernamePair>:: 661 bool StructTraits<mojom::PossibleUsernamePairDataView, PossibleUsernamePair>::
656 Read(mojom::PossibleUsernamePairDataView data, PossibleUsernamePair* out) { 662 Read(mojom::PossibleUsernamePairDataView data, PossibleUsernamePair* out) {
657 if (!data.ReadValue(&out->first) || !data.ReadFieldName(&out->second)) 663 if (!data.ReadValue(&out->first) || !data.ReadFieldName(&out->second))
658 return false; 664 return false;
659 665
660 return true; 666 return true;
661 } 667 }
662 668
663 } // namespace mojo 669 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698