Chromium Code Reviews| 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..ddfa858b0214ed13e8695d50bc25b44ff8b50612 100644 |
| --- a/chrome/browser/extensions/signin/gaia_auth_extension_loader.h |
| +++ b/chrome/browser/extensions/signin/gaia_auth_extension_loader.h |
| @@ -5,7 +5,9 @@ |
| #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 "extensions/browser/browser_context_keyed_api_factory.h" |
| namespace content { |
| @@ -29,6 +31,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 |
|
Yoyo Zhou
2015/02/04 23:24:15
nit: this is called "gaia auth" rather than "gaia_
xiyuan
2015/02/05 03:57:41
Done.
|
| + // could be used get the data. All strings are cleared when gaia auth |
|
Yoyo Zhou
2015/02/04 23:24:16
nit: used to
xiyuan
2015/02/05 03:57:41
Done.
|
| + // is unloaded. |
| + int AddData(const std::string& data); |
| + |
| + // Get data for the given id. Returns true if the data is found and |
|
Yoyo Zhou
2015/02/04 23:24:16
Be consistent here ("ID")
xiyuan
2015/02/05 03:57:41
Done.
|
| + // 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 +61,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); |
|
Yoyo Zhou
2015/02/04 23:24:16
#include "base/macros.h" for this
xiyuan
2015/02/05 03:57:41
Done.
|
| }; |