OLD | NEW |
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 CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_ |
6 #define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_ | 6 #define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 | 11 |
| 12 #include "build/build_config.h" |
12 #include "components/signin/core/browser/fake_signin_manager.h" | 13 #include "components/signin/core/browser/fake_signin_manager.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 class BrowserContext; | 16 class BrowserContext; |
16 } | 17 } |
17 | 18 |
18 class KeyedService; | 19 class KeyedService; |
19 class Profile; | 20 class Profile; |
20 | 21 |
21 // Helper function to be used with KeyedService::SetTestingFactory(). | 22 // Helper function to be used with KeyedService::SetTestingFactory(). |
22 // In order to match the API of SigninManagerFactory::GetForProfile(), returns a | 23 // In order to match the API of SigninManagerFactory::GetForProfile(), returns a |
23 // FakeSigninManagerBase* on ChromeOS, and a FakeSigninManager* on all other | 24 // FakeSigninManagerBase* on ChromeOS, and a FakeSigninManager* on all other |
24 // platforms. The returned instance is initialized. | 25 // platforms. The returned instance is initialized. |
25 scoped_ptr<KeyedService> BuildFakeSigninManagerBase( | 26 scoped_ptr<KeyedService> BuildFakeSigninManagerBase( |
26 content::BrowserContext* context); | 27 content::BrowserContext* context); |
27 | 28 |
28 class FakeSigninManagerForTesting | 29 class FakeSigninManagerForTesting |
29 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
30 : public FakeSigninManagerBase { | 31 : public FakeSigninManagerBase { |
31 #else | 32 #else |
32 : public FakeSigninManager { | 33 : public FakeSigninManager { |
33 #endif | 34 #endif |
34 | 35 |
35 public: | 36 public: |
36 FakeSigninManagerForTesting(Profile* profile); | 37 FakeSigninManagerForTesting(Profile* profile); |
37 }; | 38 }; |
38 | 39 |
39 #endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_ | 40 #endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_BUILDER_H_ |
OLD | NEW |