| OLD | NEW |
| 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/chooser_controller/mock_chooser_controller.h" | 5 #include "chrome/browser/chooser_controller/mock_chooser_controller.h" |
| 6 | 6 |
| 7 MockChooserController::MockChooserController(content::RenderFrameHost* owner) | 7 MockChooserController::MockChooserController(content::RenderFrameHost* owner) |
| 8 : ChooserController(owner) {} | 8 : ChooserController(owner) {} |
| 9 | 9 |
| 10 MockChooserController::~MockChooserController() {} | 10 MockChooserController::~MockChooserController() {} |
| 11 | 11 |
| 12 size_t MockChooserController::NumOptions() const { | 12 size_t MockChooserController::NumOptions() const { |
| 13 return option_names_.size(); | 13 return option_names_.size(); |
| 14 } | 14 } |
| 15 | 15 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 27 for (auto it = option_names_.begin(); it != option_names_.end(); ++it) { | 27 for (auto it = option_names_.begin(); it != option_names_.end(); ++it) { |
| 28 if (*it == option_name) { | 28 if (*it == option_name) { |
| 29 size_t index = it - option_names_.begin(); | 29 size_t index = it - option_names_.begin(); |
| 30 option_names_.erase(it); | 30 option_names_.erase(it); |
| 31 if (observer()) | 31 if (observer()) |
| 32 observer()->OnOptionRemoved(index); | 32 observer()->OnOptionRemoved(index); |
| 33 return; | 33 return; |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 } | 36 } |
| OLD | NEW |