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

Side by Side Diff: components/reading_list/core/reading_list_model_impl.cc

Issue 2863303002: Fixes a DCHECK in tools_menu_button_observer_bridge during tests (Closed)
Patch Set: delete unnecessary implementation of Shutdown() Created 3 years, 7 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
« no previous file with comments | « no previous file | components/reading_list/core/reading_list_model_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/reading_list/core/reading_list_model_impl.h" 5 #include "components/reading_list/core/reading_list_model_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 DCHECK(read_entry_count_ + unread_entry_count_ == entries_->size()); 51 DCHECK(read_entry_count_ + unread_entry_count_ == entries_->size());
52 loaded_ = true; 52 loaded_ = true;
53 for (auto& observer : observers_) 53 for (auto& observer : observers_)
54 observer.ReadingListModelLoaded(this); 54 observer.ReadingListModelLoaded(this);
55 } 55 }
56 56
57 void ReadingListModelImpl::Shutdown() { 57 void ReadingListModelImpl::Shutdown() {
58 DCHECK(CalledOnValidThread()); 58 DCHECK(CalledOnValidThread());
59 for (auto& observer : observers_) 59 for (auto& observer : observers_)
60 observer.ReadingListModelBeingDeleted(this); 60 observer.ReadingListModelBeingShutdown(this);
61 loaded_ = false; 61 loaded_ = false;
62 } 62 }
63 63
64 bool ReadingListModelImpl::loaded() const { 64 bool ReadingListModelImpl::loaded() const {
65 DCHECK(CalledOnValidThread()); 65 DCHECK(CalledOnValidThread());
66 return loaded_; 66 return loaded_;
67 } 67 }
68 68
69 size_t ReadingListModelImpl::size() const { 69 size_t ReadingListModelImpl::size() const {
70 DCHECK(CalledOnValidThread()); 70 DCHECK(CalledOnValidThread());
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 syncer::ModelTypeSyncBridge* ReadingListModelImpl::GetModelTypeSyncBridge() { 537 syncer::ModelTypeSyncBridge* ReadingListModelImpl::GetModelTypeSyncBridge() {
538 if (!storage_layer_) 538 if (!storage_layer_)
539 return nullptr; 539 return nullptr;
540 return storage_layer_.get(); 540 return storage_layer_.get();
541 } 541 }
542 542
543 ReadingListModelStorage* ReadingListModelImpl::StorageLayer() { 543 ReadingListModelStorage* ReadingListModelImpl::StorageLayer() {
544 return storage_layer_.get(); 544 return storage_layer_.get();
545 } 545 }
OLDNEW
« no previous file with comments | « no previous file | components/reading_list/core/reading_list_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698