Index: chrome/browser/extensions/signin/gaia_auth_extension_loader.h |
diff --git a/chrome/browser/extensions/signin/gaia_auth_extension_loader.h b/chrome/browser/extensions/signin/gaia_auth_extension_loader.h |
index 20fd46482a3e8fc338f7868e1ef895e6b42f409c..146596e11691145ac9532c4686a9fcd85bdb4c43 100644 |
--- a/chrome/browser/extensions/signin/gaia_auth_extension_loader.h |
+++ b/chrome/browser/extensions/signin/gaia_auth_extension_loader.h |
@@ -5,7 +5,10 @@ |
#ifndef CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ |
#define CHROME_BROWSER_EXTENSIONS_SIGNIN_GAIA_AUTH_EXTENSION_LOADER_H_ |
-#include "base/memory/scoped_ptr.h" |
+#include <map> |
+#include <string> |
+ |
+#include "base/macros.h" |
#include "extensions/browser/browser_context_keyed_api_factory.h" |
namespace content { |
@@ -29,6 +32,15 @@ class GaiaAuthExtensionLoader : public BrowserContextKeyedAPI { |
// Unload the gaia auth extension if no pending reference. |
void UnloadIfNeeded(); |
+ // Add a string data for gaia auth extension. Returns an ID that |
+ // could be used to get the data. All strings are cleared when gaia auth |
+ // is unloaded. |
+ int AddData(const std::string& data); |
+ |
+ // Get data for the given ID. Returns true if the data is found and |
+ // its value is copied to |data|. Otherwise, returns false. |
+ bool GetData(int data_id, std::string* data); |
+ |
static GaiaAuthExtensionLoader* Get(content::BrowserContext* context); |
// BrowserContextKeyedAPI implementation. |
@@ -50,6 +62,9 @@ class GaiaAuthExtensionLoader : public BrowserContextKeyedAPI { |
content::BrowserContext* browser_context_; |
int load_count_; |
+ int last_data_id_; |
+ std::map<int, std::string> data_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GaiaAuthExtensionLoader); |
}; |