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

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

Issue 2767373002: Implement GetJobResponse and merge JobData into DataManager. (Closed)
Patch Set: Removed typedef and added DISALLOW_COPY_AND_ASSIGN 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
« no previous file with comments | « content/browser/BUILD.gn ('k') | 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ~BackgroundFetchContext(); 56 ~BackgroundFetchContext();
57 57
58 void CreateRequest(std::unique_ptr<BackgroundFetchJobInfo> job_info, 58 void CreateRequest(
59 std::vector<BackgroundFetchRequestInfo>& request_infos); 59 std::unique_ptr<BackgroundFetchJobInfo> job_info,
60 std::vector<std::unique_ptr<BackgroundFetchRequestInfo>> request_infos);
60 61
61 // Callback for the JobController when the job is complete. 62 // Callback for the JobController when the job is complete.
62 void DidCompleteJob(const std::string& job_guid); 63 void DidCompleteJob(const std::string& job_guid);
63 64
64 void ShutdownOnIO(); 65 void ShutdownOnIO();
65 66
66 // |this| is owned by the BrowserContext via the StoragePartition. 67 // |this| is owned by the BrowserContext via the StoragePartition.
67 BrowserContext* browser_context_; 68 BrowserContext* browser_context_;
68 StoragePartition* storage_partition_; 69 StoragePartition* storage_partition_;
69 70
70 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 71 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
71 BackgroundFetchDataManager background_fetch_data_manager_; 72 BackgroundFetchDataManager background_fetch_data_manager_;
72 73
73 std::unordered_map<std::string, std::unique_ptr<BackgroundFetchJobController>> 74 std::unordered_map<std::string, std::unique_ptr<BackgroundFetchJobController>>
74 job_map_; 75 job_map_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext); 77 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchContext);
77 }; 78 };
78 79
79 } // namespace content 80 } // namespace content
80 81
81 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_ 82 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/background_fetch/background_fetch_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698