Chromium Code Reviews| 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 #import "ios/chrome/browser/ui/toolbar/tools_menu_button_observer_bridge.h" | 5 #import "ios/chrome/browser/ui/toolbar/tools_menu_button_observer_bridge.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "components/reading_list/core/reading_list_model.h" | 9 #include "components/reading_list/core/reading_list_model.h" |
| 10 #import "ios/chrome/browser/ui/toolbar/toolbar_tools_menu_button.h" | 10 #import "ios/chrome/browser/ui/toolbar/toolbar_tools_menu_button.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 #pragma mark - ReadingListModelBridgeObserver | 54 #pragma mark - ReadingListModelBridgeObserver |
| 55 | 55 |
| 56 - (void)readingListModelLoaded:(const ReadingListModel*)model { | 56 - (void)readingListModelLoaded:(const ReadingListModel*)model { |
| 57 [self updateButtonWithModel:model]; | 57 [self updateButtonWithModel:model]; |
| 58 } | 58 } |
| 59 | 59 |
| 60 - (void)readingListModelDidApplyChanges:(const ReadingListModel*)model { | 60 - (void)readingListModelDidApplyChanges:(const ReadingListModel*)model { |
| 61 [self updateButtonWithModel:model]; | 61 [self updateButtonWithModel:model]; |
| 62 } | 62 } |
| 63 | 63 |
| 64 - (void)readingListModelBeingShutdown:(const ReadingListModel*)model { | |
| 65 DCHECK(model == _model); | |
| 66 } | |
|
noyau (Ping after 24h)
2017/05/09 13:27:10
Is this method really necessary? In C++ this would
pkl (ping after 24h if needed)
2017/05/18 04:51:04
Removing this method since it is not doing anythin
| |
| 67 | |
| 64 - (void)readingListModelBeingDeleted:(const ReadingListModel*)model { | 68 - (void)readingListModelBeingDeleted:(const ReadingListModel*)model { |
| 65 DCHECK(model == _model); | 69 DCHECK(model == _model); |
|
rohitrao (ping after 24h)
2017/05/09 14:52:08
Does anyone know why this DCHECK exists or what it
noyau (Ping after 24h)
2017/05/15 14:36:12
It's enforcing the fact that this method should on
pkl (ping after 24h if needed)
2017/05/18 04:51:04
This should really be here. After rebasing, I noti
| |
| 66 _model = nullptr; | 70 _model = nullptr; |
| 67 } | 71 } |
| 68 | 72 |
| 69 - (void)readingListModel:(const ReadingListModel*)model | 73 - (void)readingListModel:(const ReadingListModel*)model |
| 70 didAddEntry:(const GURL&)url | 74 didAddEntry:(const GURL&)url |
| 71 entrySource:(reading_list::EntrySource)source { | 75 entrySource:(reading_list::EntrySource)source { |
| 72 if (source == reading_list::ADDED_VIA_CURRENT_APP) | 76 if (source == reading_list::ADDED_VIA_CURRENT_APP) |
| 73 [_button triggerAnimation]; | 77 [_button triggerAnimation]; |
| 74 } | 78 } |
| 75 | 79 |
| 76 @end | 80 @end |
| OLD | NEW |