Chromium Code Reviews| 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_CHROMEOS_GDATA_OPERATIONS_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" | 11 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" |
| 12 #include "chrome/browser/chromeos/gdata/gdata_params.h" | 12 #include "chrome/browser/chromeos/gdata/gdata_operations_callback.h" |
|
satorux1
2012/08/08 20:21:19
do we need this?
yoshiki
2012/08/08 22:54:37
Done.
| |
| 13 #include "chrome/common/net/gaia/oauth2_access_token_consumer.h" | 13 #include "chrome/common/net/gaia/oauth2_access_token_consumer.h" |
| 14 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
| 15 #include "net/url_request/url_fetcher.h" | 15 #include "net/url_request/url_fetcher.h" |
| 16 #include "net/url_request/url_fetcher_delegate.h" | 16 #include "net/url_request/url_fetcher_delegate.h" |
| 17 | 17 |
| 18 class Profile; | 18 class Profile; |
| 19 class OAuth2AccessTokenFetcher; | 19 class OAuth2AccessTokenFetcher; |
| 20 | 20 |
| 21 namespace gdata { | 21 namespace gdata { |
| 22 | 22 |
| 23 // Callback type for authentication related DocumentService calls. | |
| 24 typedef base::Callback<void(GDataErrorCode error, | |
| 25 const std::string& token)> AuthStatusCallback; | |
| 26 | |
| 23 //================================ AuthOperation =============================== | 27 //================================ AuthOperation =============================== |
| 24 | 28 |
| 25 // OAuth2 authorization token retrieval operation. | 29 // OAuth2 authorization token retrieval operation. |
| 26 class AuthOperation : public GDataOperationRegistry::Operation, | 30 class AuthOperation : public GDataOperationRegistry::Operation, |
| 27 public OAuth2AccessTokenConsumer { | 31 public OAuth2AccessTokenConsumer { |
| 28 public: | 32 public: |
| 29 AuthOperation(GDataOperationRegistry* registry, | 33 AuthOperation(GDataOperationRegistry* registry, |
| 30 Profile* profile, | 34 Profile* profile, |
| 31 const AuthStatusCallback& callback, | 35 const AuthStatusCallback& callback, |
| 32 const std::string& refresh_token); | 36 const std::string& refresh_token); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 | 213 |
| 210 // Note: This should remain the last member so it'll be destroyed and | 214 // Note: This should remain the last member so it'll be destroyed and |
| 211 // invalidate its weak pointers before any other members are destroyed. | 215 // invalidate its weak pointers before any other members are destroyed. |
| 212 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; | 216 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; |
| 213 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); | 217 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); |
| 214 }; | 218 }; |
| 215 | 219 |
| 216 } // namespace gdata | 220 } // namespace gdata |
| 217 | 221 |
| 218 #endif // CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ | 222 #endif // CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ |
| OLD | NEW |