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

Side by Side Diff: content/child/resource_scheduling_filter.h

Issue 2494493003: Fix ResourceSchedulingFilter crash after ResourceDispatcher deleted (Closed)
Patch Set: Created 4 years, 1 month 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/child/resource_dispatcher.h ('k') | content/child/resource_scheduling_filter.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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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_CHILD_RESOURCE_SCHEDULING_FILTER_H_ 5 #ifndef CONTENT_CHILD_RESOURCE_SCHEDULING_FILTER_H_
6 #define CONTENT_CHILD_RESOURCE_SCHEDULING_FILTER_H_ 6 #define CONTENT_CHILD_RESOURCE_SCHEDULING_FILTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ~ResourceSchedulingFilter() override; 48 ~ResourceSchedulingFilter() override;
49 49
50 using RequestIdToTaskRunnerMap = 50 using RequestIdToTaskRunnerMap =
51 std::map<int, scoped_refptr<base::SingleThreadTaskRunner>>; 51 std::map<int, scoped_refptr<base::SingleThreadTaskRunner>>;
52 52
53 // This lock guards |request_id_to_task_runner_map_| 53 // This lock guards |request_id_to_task_runner_map_|
54 base::Lock request_id_to_task_runner_map_lock_; 54 base::Lock request_id_to_task_runner_map_lock_;
55 RequestIdToTaskRunnerMap request_id_to_task_runner_map_; 55 RequestIdToTaskRunnerMap request_id_to_task_runner_map_;
56 56
57 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 57 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
58 ResourceDispatcher* resource_dispatcher_; // NOT OWNED 58 base::WeakPtr<ResourceDispatcher> resource_dispatcher_;
59 base::WeakPtrFactory<ResourceSchedulingFilter> weak_ptr_factory_; 59 base::WeakPtrFactory<ResourceSchedulingFilter> weak_ptr_factory_;
60 60
61 private: 61 private:
62 DISALLOW_COPY_AND_ASSIGN(ResourceSchedulingFilter); 62 DISALLOW_COPY_AND_ASSIGN(ResourceSchedulingFilter);
63 }; 63 };
64 64
65 } // namespace content 65 } // namespace content
66 66
67 #endif // CONTENT_CHILD_RESOURCE_SCHEDULING_FILTER_H_ 67 #endif // CONTENT_CHILD_RESOURCE_SCHEDULING_FILTER_H_
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/resource_scheduling_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698