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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 IPC::Message* reply_message) 1582 IPC::Message* reply_message)
1583 : provider_(provider->AsWeakPtr()), 1583 : provider_(provider->AsWeakPtr()),
1584 reply_message_(reply_message) { 1584 reply_message_(reply_message) {
1585 } 1585 }
1586 1586
1587 AutomationProviderGetPasswordsObserver:: 1587 AutomationProviderGetPasswordsObserver::
1588 ~AutomationProviderGetPasswordsObserver() {} 1588 ~AutomationProviderGetPasswordsObserver() {}
1589 1589
1590 void AutomationProviderGetPasswordsObserver::OnPasswordStoreRequestDone( 1590 void AutomationProviderGetPasswordsObserver::OnPasswordStoreRequestDone(
1591 CancelableRequestProvider::Handle handle, 1591 CancelableRequestProvider::Handle handle,
1592 const std::vector<webkit::forms::PasswordForm*>& result) { 1592 const std::vector<content::PasswordForm*>& result) {
1593 if (!provider_) { 1593 if (!provider_) {
1594 delete this; 1594 delete this;
1595 return; 1595 return;
1596 } 1596 }
1597 1597
1598 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 1598 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
1599 1599
1600 ListValue* passwords = new ListValue; 1600 ListValue* passwords = new ListValue;
1601 for (std::vector<webkit::forms::PasswordForm*>::const_iterator it = 1601 for (std::vector<content::PasswordForm*>::const_iterator it =
1602 result.begin(); it != result.end(); ++it) { 1602 result.begin(); it != result.end(); ++it) {
1603 DictionaryValue* password_val = new DictionaryValue; 1603 DictionaryValue* password_val = new DictionaryValue;
1604 webkit::forms::PasswordForm* password_form = *it; 1604 content::PasswordForm* password_form = *it;
1605 password_val->SetString("username_value", password_form->username_value); 1605 password_val->SetString("username_value", password_form->username_value);
1606 password_val->SetString("password_value", password_form->password_value); 1606 password_val->SetString("password_value", password_form->password_value);
1607 password_val->SetString("signon_realm", password_form->signon_realm); 1607 password_val->SetString("signon_realm", password_form->signon_realm);
1608 password_val->SetDouble( 1608 password_val->SetDouble(
1609 "time", static_cast<double>(password_form->date_created.ToDoubleT())); 1609 "time", static_cast<double>(password_form->date_created.ToDoubleT()));
1610 password_val->SetString("origin_url", password_form->origin.spec()); 1610 password_val->SetString("origin_url", password_form->origin.spec());
1611 password_val->SetString("username_element", 1611 password_val->SetString("username_element",
1612 password_form->username_element); 1612 password_form->username_element);
1613 password_val->SetString("password_element", 1613 password_val->SetString("password_element",
1614 password_form->password_element); 1614 password_form->password_element);
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 if (automation_) { 2879 if (automation_) {
2880 AutomationJSONReply(automation_, reply_message_.release()) 2880 AutomationJSONReply(automation_, reply_message_.release())
2881 .SendSuccess(NULL); 2881 .SendSuccess(NULL);
2882 } 2882 }
2883 delete this; 2883 delete this;
2884 } 2884 }
2885 } else { 2885 } else {
2886 NOTREACHED(); 2886 NOTREACHED();
2887 } 2887 }
2888 } 2888 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698