| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 ServerFieldType type, | 128 ServerFieldType type, |
| 129 const string16& value) OVERRIDE { | 129 const string16& value) OVERRIDE { |
| 130 if (!use_validation_) | 130 if (!use_validation_) |
| 131 return string16(); | 131 return string16(); |
| 132 return AutofillDialogControllerImpl::InputValidityMessage( | 132 return AutofillDialogControllerImpl::InputValidityMessage( |
| 133 section, type, value); | 133 section, type, value); |
| 134 } | 134 } |
| 135 | 135 |
| 136 virtual ValidityMessages InputsAreValid( | 136 virtual ValidityMessages InputsAreValid( |
| 137 DialogSection section, | 137 DialogSection section, |
| 138 const DetailOutputMap& inputs) OVERRIDE { | 138 const FieldValueMap& inputs) OVERRIDE { |
| 139 if (!use_validation_) | 139 if (!use_validation_) |
| 140 return ValidityMessages(); | 140 return ValidityMessages(); |
| 141 return AutofillDialogControllerImpl::InputsAreValid(section, inputs); | 141 return AutofillDialogControllerImpl::InputsAreValid(section, inputs); |
| 142 } | 142 } |
| 143 | 143 |
| 144 // Saving to Chrome is tested in AutofillDialogControllerImpl unit tests. | 144 // Saving to Chrome is tested in AutofillDialogControllerImpl unit tests. |
| 145 // TODO(estade): test that the view defaults to saving to Chrome. | 145 // TODO(estade): test that the view defaults to saving to Chrome. |
| 146 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE { | 146 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE { |
| 147 return false; | 147 return false; |
| 148 } | 148 } |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 controller()->MenuModelForSection(SECTION_SHIPPING)->ActivatedAt(2); | 1247 controller()->MenuModelForSection(SECTION_SHIPPING)->ActivatedAt(2); |
| 1248 // Tabs should now be: / rAc() \/ manage 2 \/ manage 1 \/ blank \. | 1248 // Tabs should now be: / rAc() \/ manage 2 \/ manage 1 \/ blank \. |
| 1249 EXPECT_EQ(4, tab_strip->count()); | 1249 EXPECT_EQ(4, tab_strip->count()); |
| 1250 EXPECT_EQ(0, tab_strip->GetIndexOfWebContents(dialog_invoker)); | 1250 EXPECT_EQ(0, tab_strip->GetIndexOfWebContents(dialog_invoker)); |
| 1251 EXPECT_EQ(1, tab_strip->active_index()); | 1251 EXPECT_EQ(1, tab_strip->active_index()); |
| 1252 EXPECT_EQ(2, tab_strip->GetIndexOfWebContents(first_manage_tab)); | 1252 EXPECT_EQ(2, tab_strip->GetIndexOfWebContents(first_manage_tab)); |
| 1253 EXPECT_EQ(3, tab_strip->GetIndexOfWebContents(blank_tab)); | 1253 EXPECT_EQ(3, tab_strip->GetIndexOfWebContents(blank_tab)); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 } // namespace autofill | 1256 } // namespace autofill |
| OLD | NEW |