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

Unified Diff: chrome/browser/supervised_user/permission_request_creator_apiary.h

Issue 614053002: Supervised Users: Add tests for PermissionRequestCreatorApiary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/supervised_user/permission_request_creator_apiary.h
diff --git a/chrome/browser/supervised_user/permission_request_creator_apiary.h b/chrome/browser/supervised_user/permission_request_creator_apiary.h
index 990b2f5606c57f245448d8140dc5309148ab937b..d1abb21321f42ca11f5dd8f6415bc0340237d03c 100644
--- a/chrome/browser/supervised_user/permission_request_creator_apiary.h
+++ b/chrome/browser/supervised_user/permission_request_creator_apiary.h
@@ -31,18 +31,21 @@ class PermissionRequestCreatorApiary : public PermissionRequestCreator,
public net::URLFetcherDelegate {
public:
PermissionRequestCreatorApiary(
+ const GURL& api_url,
OAuth2TokenService* oauth2_token_service,
scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper,
net::URLRequestContextGetter* context);
virtual ~PermissionRequestCreatorApiary();
static scoped_ptr<PermissionRequestCreator> CreateWithProfile(
- Profile* profile);
+ const GURL& api_url, Profile* profile);
// PermissionRequestCreator implementation:
virtual void CreatePermissionRequest(const GURL& url_requested,
const base::Closure& callback) OVERRIDE;
+ void set_url_fetcher_id_for_testing(int id) { url_fetcher_id_ = id; }
+
private:
struct Request;
typedef ScopedVector<Request>::iterator RequestIterator;
@@ -67,9 +70,11 @@ class PermissionRequestCreatorApiary : public PermissionRequestCreator,
void DispatchGoogleServiceAuthError(RequestIterator it,
const GoogleServiceAuthError& error);
+ GURL url_;
OAuth2TokenService* oauth2_token_service_;
scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper_;
net::URLRequestContextGetter* context_;
+ int url_fetcher_id_;
ScopedVector<Request> requests_;
};

Powered by Google App Engine
This is Rietveld 408576698