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

Unified Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api.h

Issue 10836182: Obfuscated Gaia ID fetcher (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Style changes per DCheng and Munjal Created 8 years, 4 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/extensions/api/push_messaging/push_messaging_api.h
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
index 5d8e95cc92354a4aad3fbf48def392ed1988d9ac..5f9738e5521c0fcc0f78f60f05237da1b9731d0e 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h
@@ -9,7 +9,11 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/api/push_messaging/invalidation_handler_observer.h"
+#include "chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h"
+#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/common/net/gaia/google_service_auth_error.h"
class Profile;
@@ -36,6 +40,31 @@ class PushMessagingEventRouter : public InvalidationHandlerObserver {
DISALLOW_COPY_AND_ASSIGN(PushMessagingEventRouter);
};
+class PushMessagingGetChannelIdFunction
+ : public AsyncExtensionFunction, public ObfuscatedGaiaIdFetcher::Delegate {
+ public:
+ PushMessagingGetChannelIdFunction();
+
+ protected:
+ virtual ~PushMessagingGetChannelIdFunction();
+
+ // ExtensionFunction:
+ virtual bool RunImpl() OVERRIDE;
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.pushMessaging.getChannelId");
+
+ private:
+ void GetChannelIdOnIOThread();
Munjal (Google) 2012/08/20 21:16:22 You are not using this method anymore.
Pete Williamson 2012/08/20 22:26:45 Done.
+ void Respond(const std::string& gaiaId, const long status);
Munjal (Google) 2012/08/20 21:16:22 Nit: May be name "ReportResult" to be consistent w
+ // ObfuscatedGiaiaIdFetcher::Delegate implementation.
+ virtual void OnObfuscatedGaiaIdFetchSuccess(const std::string& gaia_id)
+ OVERRIDE;
+ virtual void OnObfuscatedGaiaIdFetchFailure(
+ const GoogleServiceAuthError& error) OVERRIDE;
+ scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction);
+};
+
} // namespace extension
#endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__

Powered by Google App Engine
This is Rietveld 408576698