summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 14:39:08 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 14:39:08 +0000
commit33ad6ce948e24e01ec1634af63001dda4ac0506a (patch)
tree71daec231014a7b05e1a213e2ac0a9a41f4ca52a /components
parentd0a60eea5c90a5b594604c91654859a493e1b5cb (diff)
downloadchromium_src-33ad6ce948e24e01ec1634af63001dda4ac0506a.zip
chromium_src-33ad6ce948e24e01ec1634af63001dda4ac0506a.tar.gz
chromium_src-33ad6ce948e24e01ec1634af63001dda4ac0506a.tar.bz2
Revert 219709 "Remove the Extensions URLRequestContext."
Reverted due to crashes under memory tools. BUG=280138 > Remove the Extensions URLRequestContext. > > Though chrome-extension: scheme URLs support cookies, they do not share > a namespace with http: and https:. In particular, chrome-extension://a and > http://a should not have the same set of cookies. > > To enforce this, previously the code created a completely separate > URLRequestContext for servicing chrome-extension: schemes. However, > the code really only used this object as a method for conveying the > correct cookie jar from Profile creation to a few spots where cookies > were accessed; the rest of the URLRequestContext functionality was unused. > > This CL removes the Extensions URLRequestContext code and replaces it > with APIs that directly expose the needed net::CookieStore. > > Lastly, CookieMonster::EnableFileScheme() is removed and > CookieMonster::Delegate is renamed CookieMonsterDelegate. > > EnableFileScheme is an inherently racy API because > CookieMonsters are creatable on all threads and this > function sets an unprotected global flag. CookieMonsterDelegate > is preferable to the nested interface because it can now be > forward declared. > > TBRing darin and sky to cover the rest of the mechanical unittest changes. > > TBR=darin,sky > BUG=158386,159193,57884 > > Review URL: https://chromiumcodereview.appspot.com/12546016 TBR=ajwong@chromium.org Review URL: https://codereview.chromium.org/23551005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc b/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
index 391fcba..e9662a5 100644
--- a/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
+++ b/components/autofill/content/browser/wallet/wallet_signin_helper_unittest.cc
@@ -11,7 +11,6 @@
#include "chrome/test/base/testing_profile.h"
#include "components/autofill/content/browser/wallet/wallet_service_url.h"
#include "components/autofill/content/browser/wallet/wallet_signin_helper_delegate.h"
-#include "content/public/browser/storage_partition.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/gaia_urls.h"
@@ -202,6 +201,7 @@ TEST_F(WalletSigninHelperTest, PassiveUserInfoFailedUserInfo) {
TEST_F(WalletSigninHelperTest, GetWalletCookieValueWhenPresent) {
EXPECT_CALL(mock_delegate_, OnDidFetchWalletCookieValue("gdToken"));
+ net::CookieMonster* cookie_monster = new net::CookieMonster(NULL, NULL);
net::CookieOptions httponly_options;
httponly_options.set_include_httponly();
scoped_ptr<net::CanonicalCookie> cookie(
@@ -212,12 +212,9 @@ TEST_F(WalletSigninHelperTest, GetWalletCookieValueWhenPresent) {
net::CookieList cookie_list;
cookie_list.push_back(*cookie);
-
- net::CookieMonster* cookie_monster =
- content::BrowserContext::GetDefaultStoragePartition(&browser_context_)->
- GetCookieStoreForScheme(GetPassiveAuthUrl().scheme())->
- GetCookieMonster();
cookie_monster->InitializeFrom(cookie_list);
+ browser_context_.GetRequestContext()->GetURLRequestContext()
+ ->set_cookie_store(cookie_monster);
signin_helper_->StartWalletCookieValueFetch();
base::RunLoop().RunUntilIdle();
}