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

Side by Side Diff: components/offline_pages/downloads/download_ui_adapter.h

Issue 2284933002: Remove OfflineURL from offline page (Closed)
Patch Set: Add comment per feedback Created 4 years, 2 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 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 #ifndef COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_
6 #define COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_ 6 #define COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 LOADED 91 LOADED
92 }; 92 };
93 93
94 struct ItemInfo { 94 struct ItemInfo {
95 explicit ItemInfo(const OfflinePageItem& page); 95 explicit ItemInfo(const OfflinePageItem& page);
96 ~ItemInfo(); 96 ~ItemInfo();
97 97
98 std::unique_ptr<DownloadUIItem> ui_item; 98 std::unique_ptr<DownloadUIItem> ui_item;
99 // Additional cached data, not exposed to UI through DownloadUIItem. 99 // Additional cached data, not exposed to UI through DownloadUIItem.
100 int64_t offline_id; 100 int64_t offline_id;
101 GURL offline_url;
102 101
103 private: 102 private:
104 DISALLOW_COPY_AND_ASSIGN(ItemInfo); 103 DISALLOW_COPY_AND_ASSIGN(ItemInfo);
105 }; 104 };
106 105
107 typedef std::map<std::string, std::unique_ptr<ItemInfo>> DownloadUIItems; 106 typedef std::map<std::string, std::unique_ptr<ItemInfo>> DownloadUIItems;
108 107
109 void LoadCache(); 108 void LoadCache();
110 void ClearCache(); 109 void ClearCache();
111 110
(...skipping 16 matching lines...) Expand all
128 int observers_count_; 127 int observers_count_;
129 128
130 base::WeakPtrFactory<DownloadUIAdapter> weak_ptr_factory_; 129 base::WeakPtrFactory<DownloadUIAdapter> weak_ptr_factory_;
131 130
132 DISALLOW_COPY_AND_ASSIGN(DownloadUIAdapter); 131 DISALLOW_COPY_AND_ASSIGN(DownloadUIAdapter);
133 }; 132 };
134 133
135 } // namespace offline_pages 134 } // namespace offline_pages
136 135
137 #endif // COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_ 136 #endif // COMPONENTS_OFFLINE_PAGE_DOWNLOADS_DOWNLOAD_UI_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698