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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 9958145: Audit the destructors of classes derived from net::URLRequestContextGetter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ToT Created 8 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 | Annotate | Revision Log
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 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 private: 114 private:
115 base::debug::LeakTracker<SafeBrowsingURLRequestContext> leak_tracker_; 115 base::debug::LeakTracker<SafeBrowsingURLRequestContext> leak_tracker_;
116 }; 116 };
117 117
118 class SafeBrowsingURLRequestContextGetter 118 class SafeBrowsingURLRequestContextGetter
119 : public net::URLRequestContextGetter { 119 : public net::URLRequestContextGetter {
120 public: 120 public:
121 explicit SafeBrowsingURLRequestContextGetter( 121 explicit SafeBrowsingURLRequestContextGetter(
122 SafeBrowsingService* sb_service_); 122 SafeBrowsingService* sb_service_);
123 virtual ~SafeBrowsingURLRequestContextGetter();
124 123
125 // Implementation for net::UrlRequestContextGetter. 124 // Implementation for net::UrlRequestContextGetter.
126 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; 125 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
127 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const 126 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const
128 OVERRIDE; 127 OVERRIDE;
129 128
129 protected:
130 virtual ~SafeBrowsingURLRequestContextGetter();
131
130 private: 132 private:
131 SafeBrowsingService* const sb_service_; // Owned by BrowserProcess. 133 SafeBrowsingService* const sb_service_; // Owned by BrowserProcess.
132 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 134 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
133 135
134 base::debug::LeakTracker<SafeBrowsingURLRequestContextGetter> leak_tracker_; 136 base::debug::LeakTracker<SafeBrowsingURLRequestContextGetter> leak_tracker_;
135 }; 137 };
136 138
137 SafeBrowsingURLRequestContextGetter::SafeBrowsingURLRequestContextGetter( 139 SafeBrowsingURLRequestContextGetter::SafeBrowsingURLRequestContextGetter(
138 SafeBrowsingService* sb_service) 140 SafeBrowsingService* sb_service)
139 : sb_service_(sb_service), 141 : sb_service_(sb_service),
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 Stop(); 1460 Stop();
1459 1461
1460 if (csd_service_.get()) 1462 if (csd_service_.get())
1461 csd_service_->SetEnabledAndRefreshState(enable); 1463 csd_service_->SetEnabledAndRefreshState(enable);
1462 if (download_service_.get()) { 1464 if (download_service_.get()) {
1463 download_service_->SetEnabled( 1465 download_service_->SetEnabled(
1464 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 1466 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
1465 switches::kDisableImprovedDownloadProtection)); 1467 switches::kDisableImprovedDownloadProtection));
1466 } 1468 }
1467 } 1469 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_service.cc ('k') | chrome/browser/sync/glue/http_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698