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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 10071035: RefCounted types should not have public destructors, chrome/browser/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/extensions/app_notify_channel_setup.h" 12 #include "chrome/browser/extensions/app_notify_channel_setup.h"
13 #include "chrome/browser/extensions/extension_function.h" 13 #include "chrome/browser/extensions/extension_function.h"
14 #include "chrome/common/net/gaia/oauth2_mint_token_flow.h" 14 #include "chrome/common/net/gaia/oauth2_mint_token_flow.h"
15 15
16 class GoogleServiceAuthError; 16 class GoogleServiceAuthError;
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 class GetAuthTokenFunction : public AsyncExtensionFunction, 20 class GetAuthTokenFunction : public AsyncExtensionFunction,
21 public OAuth2MintTokenFlow::Delegate { 21 public OAuth2MintTokenFlow::Delegate {
22 public: 22 public:
23 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.getAuthToken");
24
23 GetAuthTokenFunction(); 25 GetAuthTokenFunction();
24 26
25 private: 27 private:
26 virtual ~GetAuthTokenFunction(); 28 virtual ~GetAuthTokenFunction();
29
30 // ExtensionFunction:
27 virtual bool RunImpl() OVERRIDE; 31 virtual bool RunImpl() OVERRIDE;
28 32
29 // OAuth2MintTokenFlow::Delegate implementation: 33 // OAuth2MintTokenFlow::Delegate implementation:
30 virtual void OnMintTokenSuccess(const std::string& access_token) OVERRIDE; 34 virtual void OnMintTokenSuccess(const std::string& access_token) OVERRIDE;
31 virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) OVERRIDE; 35 virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) OVERRIDE;
32 36
33 scoped_ptr<OAuth2MintTokenFlow> flow_; 37 scoped_ptr<OAuth2MintTokenFlow> flow_;
34
35 DECLARE_EXTENSION_FUNCTION_NAME("experimental.identity.getAuthToken");
36 }; 38 };
37 39
38 } // namespace extensions 40 } // namespace extensions
39 41
40 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ 42 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698