| Index: chrome/browser/extensions/api/gcd_private/gcd_private_api.cc
|
| diff --git a/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc b/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc
|
| index 48cd48adeb47b2c0eb70d1693cf07253554dd65a..2fc31f4dafd070016551102850c4b7517362c62b 100644
|
| --- a/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc
|
| +++ b/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc
|
| @@ -351,13 +351,26 @@ void GcdPrivateAPI::StartWifiIfNotStarted() {
|
| wifi_manager_->Start();
|
| }
|
| }
|
| -
|
| #endif
|
|
|
| void GcdPrivateAPI::RemoveSession(int session_id) {
|
| sessions_.erase(session_id);
|
| }
|
|
|
| +scoped_ptr<base::ListValue> GcdPrivateAPI::GetPrefetchedSSIDList() {
|
| + scoped_ptr<base::ListValue> retval(new base::ListValue);
|
| +
|
| +#if defined(ENABLE_WIFI_BOOTSTRAPPING)
|
| + for (PasswordMap::iterator i = wifi_passwords_.begin();
|
| + i != wifi_passwords_.end();
|
| + i++) {
|
| + retval->AppendString(i->first);
|
| + }
|
| +#endif
|
| +
|
| + return retval.Pass();
|
| +}
|
| +
|
| // static
|
| void GcdPrivateAPI::SetGCDApiFlowFactoryForTests(
|
| GCDApiFlowFactoryForTests* factory) {
|
| @@ -743,6 +756,26 @@ GcdPrivateGetCommandDefinitionsFunction::
|
| ~GcdPrivateGetCommandDefinitionsFunction() {
|
| }
|
|
|
| +GcdPrivateGetPrefetchedWifiNameListFunction::
|
| + GcdPrivateGetPrefetchedWifiNameListFunction() {
|
| +}
|
| +
|
| +GcdPrivateGetPrefetchedWifiNameListFunction::
|
| + ~GcdPrivateGetPrefetchedWifiNameListFunction() {
|
| +}
|
| +
|
| +bool GcdPrivateGetPrefetchedWifiNameListFunction::RunSync() {
|
| + GcdPrivateAPI* gcd_api =
|
| + BrowserContextKeyedAPIFactory<GcdPrivateAPI>::Get(GetProfile());
|
| +
|
| + DCHECK(gcd_api);
|
| + scoped_ptr<base::ListValue> ssid_list = gcd_api->GetPrefetchedSSIDList();
|
| +
|
| + SetResult(ssid_list.release());
|
| +
|
| + return true;
|
| +}
|
| +
|
| bool GcdPrivateGetCommandDefinitionsFunction::RunAsync() {
|
| return false;
|
| }
|
|
|