| 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_EXTENSIONS_ECHO_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_ECHO_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_ECHO_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_ECHO_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 | 10 |
| 11 class GetRegistrationCodeFunction : public SyncExtensionFunction { | 11 class GetRegistrationCodeFunction : public AsyncExtensionFunction { |
| 12 public: | 12 public: |
| 13 GetRegistrationCodeFunction(); | 13 GetRegistrationCodeFunction(); |
| 14 | 14 |
| 15 protected: | 15 protected: |
| 16 virtual ~GetRegistrationCodeFunction(); | 16 virtual ~GetRegistrationCodeFunction(); |
| 17 virtual bool RunImpl() OVERRIDE; | 17 virtual bool RunImpl() OVERRIDE; |
| 18 | 18 |
| 19 private: | 19 private: |
| 20 void GetRegistrationCode(const std::string& type); |
| 20 DECLARE_EXTENSION_FUNCTION("echoPrivate.getRegistrationCode", | 21 DECLARE_EXTENSION_FUNCTION("echoPrivate.getRegistrationCode", |
| 21 ECHOPRIVATE_GETREGISTRATIONCODE) | 22 ECHOPRIVATE_GETREGISTRATIONCODE) |
| 22 }; | 23 }; |
| 23 | 24 |
| 24 class GetOobeTimestampFunction : public AsyncExtensionFunction { | 25 class GetOobeTimestampFunction : public AsyncExtensionFunction { |
| 25 public: | 26 public: |
| 26 GetOobeTimestampFunction(); | 27 GetOobeTimestampFunction(); |
| 27 | 28 |
| 28 protected: | 29 protected: |
| 29 virtual ~GetOobeTimestampFunction(); | 30 virtual ~GetOobeTimestampFunction(); |
| 30 virtual bool RunImpl() OVERRIDE; | 31 virtual bool RunImpl() OVERRIDE; |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 bool GetOobeTimestampOnFileThread(); | 34 bool GetOobeTimestampOnFileThread(); |
| 34 DECLARE_EXTENSION_FUNCTION("echoPrivate.getOobeTimestamp", | 35 DECLARE_EXTENSION_FUNCTION("echoPrivate.getOobeTimestamp", |
| 35 ECHOPRIVATE_GETOOBETIMESTAMP) | 36 ECHOPRIVATE_GETOOBETIMESTAMP) |
| 36 }; | 37 }; |
| 38 |
| 39 class CheckAllowRedeemOffersFunction : public AsyncExtensionFunction { |
| 40 public: |
| 41 CheckAllowRedeemOffersFunction(); |
| 42 |
| 43 protected: |
| 44 virtual ~CheckAllowRedeemOffersFunction(); |
| 45 virtual bool RunImpl() OVERRIDE; |
| 46 |
| 47 private: |
| 48 void CheckAllowRedeemOffers(); |
| 49 DECLARE_EXTENSION_FUNCTION("echoPrivate.checkAllowRedeemOffers", |
| 50 ECHOPRIVATE_CHECKALLOWREDEEMOFFERS) |
| 51 }; |
| 37 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_ECHO_PRIVATE_API_H_ | 52 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_ECHO_PRIVATE_API_H_ |
| OLD | NEW |