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

Side by Side Diff: ios/chrome/browser/share_extension/share_extension_service.mm

Issue 2514333003: Componentize Reading List (Closed)
Patch Set: fix Created 4 years 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
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 "base/mac/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #include "components/bookmarks/browser/bookmark_model.h" 6 #include "components/bookmarks/browser/bookmark_model.h"
7 #include "ios/chrome/browser/reading_list/reading_list_model.h" 7 #include "components/reading_list/reading_list_model.h"
8 #include "ios/chrome/browser/share_extension/share_extension_item_receiver.h" 8 #include "ios/chrome/browser/share_extension/share_extension_item_receiver.h"
9 #include "ios/chrome/browser/share_extension/share_extension_service.h" 9 #include "ios/chrome/browser/share_extension/share_extension_service.h"
10 10
11 ShareExtensionService::ShareExtensionService( 11 ShareExtensionService::ShareExtensionService(
12 bookmarks::BookmarkModel* bookmark_model, 12 bookmarks::BookmarkModel* bookmark_model,
13 ReadingListModel* reading_list_model) 13 ReadingListModel* reading_list_model)
14 : reading_list_model_(reading_list_model), 14 : reading_list_model_(reading_list_model),
15 reading_list_model_loaded_(false), 15 reading_list_model_loaded_(false),
16 bookmark_model_(bookmark_model), 16 bookmark_model_(bookmark_model),
17 bookmark_model_loaded_(false) { 17 bookmark_model_loaded_(false) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 this->AnyModelLoaded(); 50 this->AnyModelLoaded();
51 } 51 }
52 52
53 void ShareExtensionService::AnyModelLoaded() { 53 void ShareExtensionService::AnyModelLoaded() {
54 if (reading_list_model_loaded_ && bookmark_model_loaded_) { 54 if (reading_list_model_loaded_ && bookmark_model_loaded_) {
55 [[ShareExtensionItemReceiver sharedInstance] 55 [[ShareExtensionItemReceiver sharedInstance]
56 setBookmarkModel:bookmark_model_ 56 setBookmarkModel:bookmark_model_
57 readingListModel:reading_list_model_]; 57 readingListModel:reading_list_model_];
58 } 58 }
59 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698