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

Side by Side Diff: components/offline_items_collection/core/throttled_offline_content_provider.h

Issue 2811803006: Add support for pulling icons for OfflineItems (Closed)
Patch Set: More findbugs Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef COMPONENTS_OFFLINE_ITEMS_COLLETION_CORE_THROTTLED_OFFLINE_CONTENT_PROVID ER_H_ 5 #ifndef COMPONENTS_OFFLINE_ITEMS_COLLETION_CORE_THROTTLED_OFFLINE_CONTENT_PROVID ER_H_
6 #define COMPONENTS_OFFLINE_ITEMS_COLLETION_CORE_THROTTLED_OFFLINE_CONTENT_PROVID ER_H_ 6 #define COMPONENTS_OFFLINE_ITEMS_COLLETION_CORE_THROTTLED_OFFLINE_CONTENT_PROVID ER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 25 matching lines...) Expand all
36 void RemoveItem(const ContentId& id) override; 36 void RemoveItem(const ContentId& id) override;
37 void CancelDownload(const ContentId& id) override; 37 void CancelDownload(const ContentId& id) override;
38 void PauseDownload(const ContentId& id) override; 38 void PauseDownload(const ContentId& id) override;
39 void ResumeDownload(const ContentId& id) override; 39 void ResumeDownload(const ContentId& id) override;
40 40
41 // Because this class queues updates, a call to Observer::OnItemUpdated might 41 // Because this class queues updates, a call to Observer::OnItemUpdated might
42 // get triggered with the same contents as returned by these getter methods in 42 // get triggered with the same contents as returned by these getter methods in
43 // the future. 43 // the future.
44 const OfflineItem* GetItemById(const ContentId& id) override; 44 const OfflineItem* GetItemById(const ContentId& id) override;
45 OfflineItemList GetAllItems() override; 45 OfflineItemList GetAllItems() override;
46 void GetVisualsForItem(const ContentId& id,
47 const VisualsCallback& callback) override;
46 void AddObserver(OfflineContentProvider::Observer* observer) override; 48 void AddObserver(OfflineContentProvider::Observer* observer) override;
47 void RemoveObserver(OfflineContentProvider::Observer* observer) override; 49 void RemoveObserver(OfflineContentProvider::Observer* observer) override;
48 50
49 private: 51 private:
50 // OfflineContentProvider::Observer implementation. 52 // OfflineContentProvider::Observer implementation.
51 void OnItemsAvailable(OfflineContentProvider* provider) override; 53 void OnItemsAvailable(OfflineContentProvider* provider) override;
52 void OnItemsAdded(const OfflineItemList& items) override; 54 void OnItemsAdded(const OfflineItemList& items) override;
53 void OnItemRemoved(const ContentId& id) override; 55 void OnItemRemoved(const ContentId& id) override;
54 void OnItemUpdated(const OfflineItem& item) override; 56 void OnItemUpdated(const OfflineItem& item) override;
55 57
(...skipping 18 matching lines...) Expand all
74 OfflineItemMap updates_; 76 OfflineItemMap updates_;
75 77
76 base::WeakPtrFactory<ThrottledOfflineContentProvider> weak_ptr_factory_; 78 base::WeakPtrFactory<ThrottledOfflineContentProvider> weak_ptr_factory_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(ThrottledOfflineContentProvider); 80 DISALLOW_COPY_AND_ASSIGN(ThrottledOfflineContentProvider);
79 }; 81 };
80 82
81 } // namespace offline_items_collection 83 } // namespace offline_items_collection
82 84
83 #endif // COMPONENTS_OFFLINE_ITEMS_COLLETION_CORE_THROTTLED_OFFLINE_CONTENT_PRO VIDER_H_ 85 #endif // COMPONENTS_OFFLINE_ITEMS_COLLETION_CORE_THROTTLED_OFFLINE_CONTENT_PRO VIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698