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

Side by Side Diff: content/browser/appcache/appcache_dispatcher_host.h

Issue 1441683004: AppCache: Use WeakPtr<> to fix a potential uaf bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/browser/appcache/appcache_dispatcher_host.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
12 #include "base/process/process.h" 13 #include "base/process/process.h"
13 #include "content/browser/appcache/appcache_backend_impl.h" 14 #include "content/browser/appcache/appcache_backend_impl.h"
14 #include "content/browser/appcache/appcache_frontend_proxy.h" 15 #include "content/browser/appcache/appcache_frontend_proxy.h"
15 #include "content/public/browser/browser_message_filter.h" 16 #include "content/public/browser/browser_message_filter.h"
16 17
17 namespace content { 18 namespace content {
18 class ChromeAppCacheService; 19 class ChromeAppCacheService;
19 20
20 // Handles appcache related messages sent to the main browser process from 21 // Handles appcache related messages sent to the main browser process from
21 // its child processes. There is a distinct host for each child process. 22 // its child processes. There is a distinct host for each child process.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 AppCacheBackendImpl backend_impl_; 63 AppCacheBackendImpl backend_impl_;
63 64
64 content::GetStatusCallback get_status_callback_; 65 content::GetStatusCallback get_status_callback_;
65 content::StartUpdateCallback start_update_callback_; 66 content::StartUpdateCallback start_update_callback_;
66 content::SwapCacheCallback swap_cache_callback_; 67 content::SwapCacheCallback swap_cache_callback_;
67 scoped_ptr<IPC::Message> pending_reply_msg_; 68 scoped_ptr<IPC::Message> pending_reply_msg_;
68 69
69 // The corresponding ChildProcessHost object's id(). 70 // The corresponding ChildProcessHost object's id().
70 int process_id_; 71 int process_id_;
71 72
73 base::WeakPtrFactory<AppCacheDispatcherHost> weak_factory_;
74
72 DISALLOW_COPY_AND_ASSIGN(AppCacheDispatcherHost); 75 DISALLOW_COPY_AND_ASSIGN(AppCacheDispatcherHost);
73 }; 76 };
74 77
75 } // namespace content 78 } // namespace content
76 79
77 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_ 80 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/appcache/appcache_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698