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

Unified Diff: chrome/browser/policy/cloud/user_info_fetcher.h

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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/policy/cloud/user_info_fetcher.h
diff --git a/chrome/browser/policy/cloud/user_info_fetcher.h b/chrome/browser/policy/cloud/user_info_fetcher.h
deleted file mode 100644
index 1dab0ec316df19f85443fd5f58456e5ce6c861fa..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/cloud/user_info_fetcher.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_POLICY_CLOUD_USER_INFO_FETCHER_H_
-#define CHROME_BROWSER_POLICY_CLOUD_USER_INFO_FETCHER_H_
-
-#include <string>
-#include "base/memory/scoped_ptr.h"
-#include "net/url_request/url_fetcher_delegate.h"
-
-class GoogleServiceAuthError;
-
-namespace base {
-class DictionaryValue;
-}
-
-namespace net {
-class URLFetcher;
-class URLRequestContextGetter;
-}
-
-namespace policy {
-
-// Class that makes a UserInfo request, parses the response, and notifies
-// a provided Delegate when the request is complete.
-class UserInfoFetcher : public net::URLFetcherDelegate {
- public:
- class Delegate {
- public:
- // Invoked when the UserInfo request has succeeded, passing the parsed
- // response in |response|. Delegate may free the UserInfoFetcher in this
- // callback.
- virtual void OnGetUserInfoSuccess(
- const base::DictionaryValue* response) = 0;
-
- // Invoked when the UserInfo request has failed, passing the associated
- // error in |error|. Delegate may free the UserInfoFetcher in this
- // callback.
- virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) = 0;
- };
-
- // Create a new UserInfoFetcher. |context| can be NULL for unit tests.
- UserInfoFetcher(Delegate* delegate, net::URLRequestContextGetter* context);
- virtual ~UserInfoFetcher();
-
- // Starts the UserInfo request, using the passed OAuth2 |access_token|.
- void Start(const std::string& access_token);
-
- // net::URLFetcherDelegate implementation.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
-
- private:
- Delegate* delegate_;
- net::URLRequestContextGetter* context_;
- scoped_ptr<net::URLFetcher> url_fetcher_;
-
- DISALLOW_COPY_AND_ASSIGN(UserInfoFetcher);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_POLICY_CLOUD_USER_INFO_FETCHER_H_
« no previous file with comments | « chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc ('k') | chrome/browser/policy/cloud/user_info_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698