| Index: chrome/browser/extensions/api/cookies/cookies_api.cc
|
| diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc
|
| index cb17f3096c346c74a6b0b309e59d40a4fd076692..e3dbc368dffd115a42e3d6e2c7c657069f91e895 100644
|
| --- a/chrome/browser/extensions/api/cookies/cookies_api.cc
|
| +++ b/chrome/browser/extensions/api/cookies/cookies_api.cc
|
| @@ -230,7 +230,7 @@ void GetCookieFunction::GetCookieCallback(const net::CookieList& cookie_list) {
|
| // CookieMonster returns them in canonical order (longest path, then
|
| // earliest creation time).
|
| if (it->Name() == name_) {
|
| - result_.reset(
|
| + SetSingleResult(
|
| cookies_helpers::CreateCookieValue(*it, store_id_));
|
| break;
|
| }
|
| @@ -238,7 +238,7 @@ void GetCookieFunction::GetCookieCallback(const net::CookieList& cookie_list) {
|
|
|
| // The cookie doesn't exist; return null.
|
| if (it == cookie_list.end())
|
| - result_.reset(Value::CreateNullValue());
|
| + SetSingleResult(Value::CreateNullValue());
|
|
|
| bool rv = BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| @@ -296,7 +296,7 @@ void GetAllCookiesFunction::GetAllCookiesCallback(
|
| cookies_helpers::AppendMatchingCookiesToList(
|
| cookie_list, store_id_, url_, details_,
|
| GetExtension(), matching_list);
|
| - result_.reset(matching_list);
|
| + SetSingleResult(matching_list);
|
| }
|
| bool rv = BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| @@ -408,7 +408,7 @@ void SetCookieFunction::PullCookieCallback(const net::CookieList& cookie_list) {
|
| // CookieMonster returns them in canonical order (longest path, then
|
| // earliest creation time).
|
| if (it->Name() == name_) {
|
| - result_.reset(
|
| + SetSingleResult(
|
| cookies_helpers::CreateCookieValue(*it, store_id_));
|
| break;
|
| }
|
| @@ -481,7 +481,7 @@ void RemoveCookieFunction::RemoveCookieCallback() {
|
| resultDictionary->SetString(keys::kNameKey, name_);
|
| resultDictionary->SetString(keys::kUrlKey, url_.spec());
|
| resultDictionary->SetString(keys::kStoreIdKey, store_id_);
|
| - result_.reset(resultDictionary);
|
| + SetSingleResult(resultDictionary);
|
|
|
| // Return to UI thread
|
| bool rv = BrowserThread::PostTask(
|
| @@ -536,7 +536,7 @@ bool GetAllCookieStoresFunction::RunImpl() {
|
| cookies_helpers::CreateCookieStoreValue(
|
| incognito_profile, incognito_tab_ids.release()));
|
| }
|
| - result_.reset(cookie_store_list);
|
| + SetSingleResult(cookie_store_list);
|
| return true;
|
| }
|
|
|
|
|