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

Side by Side Diff: content/browser/background_fetch/background_fetch_context.h

Issue 2727253002: Added DownloadItem::Observer to JobController. (Closed)
Patch Set: Added TODO Created 3 years, 9 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 | content/browser/background_fetch/background_fetch_context.cc » ('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 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 CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ 6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 BackgroundFetchDataManager* GetDataManagerForTesting() { 46 BackgroundFetchDataManager* GetDataManagerForTesting() {
47 return &background_fetch_data_manager_; 47 return &background_fetch_data_manager_;
48 } 48 }
49 49
50 private: 50 private:
51 friend class base::DeleteHelper<BackgroundFetchContext>; 51 friend class base::DeleteHelper<BackgroundFetchContext>;
52 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; 52 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
53 friend class base::RefCountedThreadSafe<BackgroundFetchContext, 53 friend class base::RefCountedThreadSafe<BackgroundFetchContext,
54 BrowserThread::DeleteOnUIThread>; 54 BrowserThread::DeleteOnUIThread>;
55 55
56 virtual ~BackgroundFetchContext(); 56 ~BackgroundFetchContext();
57 57
58 void CreateRequest(const BackgroundFetchJobInfo& job_info, 58 void CreateRequest(const BackgroundFetchJobInfo& job_info,
59 std::vector<BackgroundFetchRequestInfo>& request_infos); 59 std::vector<BackgroundFetchRequestInfo>& request_infos);
60 60
61 void ShutdownOnIO(); 61 void ShutdownOnIO();
62 62
63 // |this| is owned by the BrowserContext via the StoragePartition. 63 // |this| is owned by the BrowserContext via the StoragePartition.
64 BrowserContext* browser_context_; 64 BrowserContext* browser_context_;
65 StoragePartition* storage_partition_; 65 StoragePartition* storage_partition_;
66 66
67 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 67 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
68 BackgroundFetchDataManager background_fetch_data_manager_; 68 BackgroundFetchDataManager background_fetch_data_manager_;
69 69
70 std::unordered_map<std::string, std::unique_ptr<BackgroundFetchJobController>> 70 std::unordered_map<std::string, std::unique_ptr<BackgroundFetchJobController>>
71 job_map_; 71 job_map_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext); 73 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext);
74 }; 74 };
75 75
76 } // namespace content 76 } // namespace content
77 77
78 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ 78 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/background_fetch/background_fetch_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698