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

Side by Side Diff: chrome/browser/policy/device_management_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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.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 #include "chrome/browser/policy/device_management_service.h" 5 #include "chrome/browser/policy/device_management_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 public: 231 public:
232 explicit DeviceManagementRequestContextGetter( 232 explicit DeviceManagementRequestContextGetter(
233 net::URLRequestContextGetter* base_context_getter) 233 net::URLRequestContextGetter* base_context_getter)
234 : base_context_getter_(base_context_getter) {} 234 : base_context_getter_(base_context_getter) {}
235 235
236 // Overridden from net::URLRequestContextGetter: 236 // Overridden from net::URLRequestContextGetter:
237 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; 237 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
238 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() 238 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy()
239 const OVERRIDE; 239 const OVERRIDE;
240 240
241 protected:
242 virtual ~DeviceManagementRequestContextGetter() {}
243
241 private: 244 private:
242 scoped_refptr<net::URLRequestContext> context_; 245 scoped_refptr<net::URLRequestContext> context_;
243 scoped_refptr<net::URLRequestContextGetter> base_context_getter_; 246 scoped_refptr<net::URLRequestContextGetter> base_context_getter_;
244 }; 247 };
245 248
246 249
247 net::URLRequestContext* 250 net::URLRequestContext*
248 DeviceManagementRequestContextGetter::GetURLRequestContext() { 251 DeviceManagementRequestContextGetter::GetURLRequestContext() {
249 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 252 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
250 if (!context_) { 253 if (!context_) {
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 } 585 }
583 } 586 }
584 587
585 const JobQueue::iterator elem = 588 const JobQueue::iterator elem =
586 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); 589 std::find(queued_jobs_.begin(), queued_jobs_.end(), job);
587 if (elem != queued_jobs_.end()) 590 if (elem != queued_jobs_.end())
588 queued_jobs_.erase(elem); 591 queued_jobs_.erase(elem);
589 } 592 }
590 593
591 } // namespace policy 594 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698