Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: most unittests pass Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index e8f452b98cd7b8620428c98f007c2e24424ace7f..d07fe1c111c452af394507160bfd82ab8a818664 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -79,6 +79,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_profile.h"
#include "components/user_prefs/pref_registry_syncable.h"
+#include "content/public/browser/cookie_store_map.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/indexed_db_context.h"
@@ -4090,9 +4091,11 @@ TEST_F(ExtensionServiceTest, ClearExtensionData) {
std::string origin_id = webkit_database::GetIdentifierFromOrigin(ext_url);
// Set a cookie for the extension.
- net::CookieMonster* cookie_monster =
- profile_->GetRequestContextForExtensions()->GetURLRequestContext()->
- cookie_store()->GetCookieMonster();
+ net::CookieStore* cookie_store =
+ BrowserContext::GetDefaultStoragePartition(profile_.get())->
+ GetCookieStoreMap().GetForScheme(ext_url.scheme());
+ ASSERT_TRUE(cookie_store);
+ net::CookieMonster* cookie_monster = cookie_store->GetCookieMonster();
ASSERT_TRUE(cookie_monster);
net::CookieOptions options;
cookie_monster->SetCookieWithOptionsAsync(
@@ -4206,9 +4209,11 @@ TEST_F(ExtensionServiceTest, ClearAppData) {
IsStorageUnlimited(origin2));
// Set a cookie for the extension.
+ content::StoragePartition* partition =
+ content::BrowserContext::GetDefaultStoragePartition(profile_.get());
net::CookieMonster* cookie_monster =
- profile_->GetRequestContext()->GetURLRequestContext()->
- cookie_store()->GetCookieMonster();
+ partition->GetCookieStoreMap().GetForScheme(origin1.scheme())->
+ GetCookieMonster();
ASSERT_TRUE(cookie_monster);
net::CookieOptions options;
cookie_monster->SetCookieWithOptionsAsync(

Powered by Google App Engine
This is Rietveld 408576698