| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/chromeos/login/account_creation_view.h" | 5 #include "chrome/browser/chromeos/login/account_creation_view.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/child_process_security_policy.h" | 10 #include "chrome/browser/child_process_security_policy.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 for (size_t i = 0; i < form.fields.size(); i++) { | 46 for (size_t i = 0; i < form.fields.size(); i++) { |
| 47 std::string name = UTF16ToASCII(form.fields[i].name()); | 47 std::string name = UTF16ToASCII(form.fields[i].name()); |
| 48 if (name == kEmailFieldName) { | 48 if (name == kEmailFieldName) { |
| 49 user_name = UTF16ToASCII(form.fields[i].value()); | 49 user_name = UTF16ToASCII(form.fields[i].value()); |
| 50 } else if (name == kDomainFieldName) { | 50 } else if (name == kDomainFieldName) { |
| 51 domain = UTF16ToASCII(form.fields[i].value()); | 51 domain = UTF16ToASCII(form.fields[i].value()); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 if (!user_name.empty()) { | 54 if (!user_name.empty()) { |
| 55 // We don't have password here because all password fields were | 55 // We don't have password here because all password fields were |
| 56 // stripped. Overriding TabContents::PasswordFormsSeen also has no sense | 56 // stripped. Overriding TabContents::PasswordFormsFound also makes no |
| 57 // becuase password value is always empty for account create page. | 57 // sense because password value is always empty for account create page. |
| 58 delegate_->OnUserCreated(user_name + "@" + domain, ""); | 58 delegate_->OnUserCreated(user_name + "@" + domain, ""); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual void FormsSeen(const std::vector<FormData>& forms) { | 63 virtual void FormsSeen(const std::vector<FormData>& forms) { |
| 64 } | 64 } |
| 65 | 65 |
| 66 virtual bool GetAutoFillSuggestions( | 66 virtual bool GetAutoFillSuggestions( |
| 67 int query_id, const webkit_glue::FormField& field) { | 67 int query_id, const webkit_glue::FormField& field) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 /////////////////////////////////////////////////////////////////////////////// | 140 /////////////////////////////////////////////////////////////////////////////// |
| 141 // AccountCreationView, views::View implementation: | 141 // AccountCreationView, views::View implementation: |
| 142 void AccountCreationView::Paint(gfx::Canvas* canvas) { | 142 void AccountCreationView::Paint(gfx::Canvas* canvas) { |
| 143 PaintBorder(canvas); | 143 PaintBorder(canvas); |
| 144 DOMView::Paint(canvas); | 144 DOMView::Paint(canvas); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace chromeos | 147 } // namespace chromeos |
| OLD | NEW |