Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MANAGED_MODE_PERMISSION_REQUEST_CREATOR_H_ | |
| 6 #define CHROME_BROWSER_MANAGED_MODE_PERMISSION_REQUEST_CREATOR_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback_forward.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/strings/string16.h" | |
| 14 | |
| 15 class GoogleServiceAuthError; | |
| 16 class ManagedUserSettingsService; | |
| 17 class ManagedUserSharedSettingsService; | |
| 18 class ManagedUserSigninManagerWrapper; | |
| 19 class OAuth2TokenService; | |
| 20 class Profile; | |
| 21 | |
| 22 namespace net { | |
| 23 class URLRequestContextGetter; | |
| 24 } | |
| 25 | |
| 26 class PermissionRequestCreator { | |
| 27 public: | |
| 28 typedef base::Callback<void(const GoogleServiceAuthError& /* error */)> | |
| 29 PermissionRequestCallback; | |
| 30 | |
| 31 static scoped_ptr<PermissionRequestCreator> Create( | |
| 32 OAuth2TokenService* oauth2_token_service, | |
| 33 scoped_ptr<ManagedUserSigninManagerWrapper>, | |
| 34 net::URLRequestContextGetter* context); | |
| 35 | |
| 36 static scoped_ptr<PermissionRequestCreator> CreateWithProfile( | |
|
Bernhard Bauer
2014/05/16 15:22:50
Let's move these to the corresponding implementati
Adrian Kuegel
2014/05/19 11:00:53
Done.
| |
| 37 Profile* profile); | |
| 38 | |
| 39 static scoped_ptr<PermissionRequestCreator> CreateWithSettingsService( | |
| 40 ManagedUserSettingsService* settings_service, | |
| 41 ManagedUserSharedSettingsService* shared_settings_service, | |
| 42 const std::string& name, | |
| 43 const std::string& managed_user_id); | |
| 44 | |
| 45 virtual ~PermissionRequestCreator() {} | |
| 46 | |
| 47 virtual void CreatePermissionRequest( | |
| 48 const std::string& url_requested, | |
| 49 const PermissionRequestCallback& callback) = 0; | |
| 50 }; | |
| 51 | |
| 52 #endif // CHROME_BROWSER_MANAGED_MODE_PERMISSION_REQUEST_CREATOR_H_ | |
| OLD | NEW |