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

Side by Side Diff: chrome/browser/protector/mock_protector_service.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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/protector/mock_protector_service.h" 5 #include "chrome/browser/protector/mock_protector_service.h"
6 6
7 #include "chrome/browser/protector/protector_service_factory.h" 7 #include "chrome/browser/protector/protector_service_factory.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 9
10 namespace protector { 10 namespace protector {
11 11
12 namespace { 12 namespace {
13 13
14 ProfileKeyedBase* BuildMockProtectorService(Profile* profile) { 14 ProfileKeyedService* BuildMockProtectorService(Profile* profile) {
15 return new MockProtectorService(profile); 15 return new MockProtectorService(profile);
16 } 16 }
17 17
18 } // namespace 18 } // namespace
19 19
20 // static 20 // static
21 MockProtectorService* MockProtectorService::BuildForProfile(Profile* profile) { 21 MockProtectorService* MockProtectorService::BuildForProfile(Profile* profile) {
22 return static_cast<MockProtectorService*>( 22 return static_cast<MockProtectorService*>(
23 ProtectorServiceFactory::GetInstance()->SetTestingFactoryAndUse( 23 ProtectorServiceFactory::GetInstance()->SetTestingFactoryAndUse(
24 profile, BuildMockProtectorService)); 24 profile, BuildMockProtectorService));
25 } 25 }
26 26
27 MockProtectorService::MockProtectorService(Profile* profile) 27 MockProtectorService::MockProtectorService(Profile* profile)
28 : ProtectorService(profile) { 28 : ProtectorService(profile) {
29 } 29 }
30 30
31 MockProtectorService::~MockProtectorService() { 31 MockProtectorService::~MockProtectorService() {
32 } 32 }
33 33
34 } // namespace protector 34 } // namespace protector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698