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

Side by Side Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 318983003: requestAutocomplete: Actually log the console message instead of dropping it on the floor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/autofill_agent.h" 5 #include "components/autofill/content/renderer/autofill_agent.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 &form_data, 286 &form_data,
287 NULL)) { 287 NULL)) {
288 error_message = "failed to parse form."; 288 error_message = "failed to parse form.";
289 } 289 }
290 290
291 if (!error_message.empty()) { 291 if (!error_message.empty()) {
292 WebConsoleMessage console_message = WebConsoleMessage( 292 WebConsoleMessage console_message = WebConsoleMessage(
293 WebConsoleMessage::LevelLog, 293 WebConsoleMessage::LevelLog,
294 WebString(base::ASCIIToUTF16("requestAutocomplete: ") + 294 WebString(base::ASCIIToUTF16("requestAutocomplete: ") +
295 base::ASCIIToUTF16(error_message))); 295 base::ASCIIToUTF16(error_message)));
296 form.document().frame()->addMessageToConsole(console_message);
296 WebFormElement(form).finishRequestAutocomplete( 297 WebFormElement(form).finishRequestAutocomplete(
297 WebFormElement::AutocompleteResultErrorDisabled); 298 WebFormElement::AutocompleteResultErrorDisabled);
298 return; 299 return;
299 } 300 }
300 301
301 // Cancel any pending Autofill requests and hide any currently showing popups. 302 // Cancel any pending Autofill requests and hide any currently showing popups.
302 ++autofill_query_id_; 303 ++autofill_query_id_;
303 HidePopup(); 304 HidePopup();
304 305
305 in_flight_request_form_ = form; 306 in_flight_request_form_ = form;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // parsed form. 722 // parsed form.
722 if (frame && !frame->parent() && !frame->isLoading()) { 723 if (frame && !frame->parent() && !frame->isLoading()) {
723 ProcessForms(*frame); 724 ProcessForms(*frame);
724 password_autofill_agent_->OnDynamicFormsSeen(frame); 725 password_autofill_agent_->OnDynamicFormsSeen(frame);
725 return; 726 return;
726 } 727 }
727 } 728 }
728 } 729 }
729 730
730 } // namespace autofill 731 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698