diff options
author | earthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 14:39:08 +0000 |
---|---|---|
committer | earthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 14:39:08 +0000 |
commit | 33ad6ce948e24e01ec1634af63001dda4ac0506a (patch) | |
tree | 71daec231014a7b05e1a213e2ac0a9a41f4ca52a /apps/shell_window_geometry_cache_unittest.cc | |
parent | d0a60eea5c90a5b594604c91654859a493e1b5cb (diff) | |
download | chromium_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 'apps/shell_window_geometry_cache_unittest.cc')
-rw-r--r-- | apps/shell_window_geometry_cache_unittest.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/shell_window_geometry_cache_unittest.cc b/apps/shell_window_geometry_cache_unittest.cc index 0d6e6e4..2b42d48 100644 --- a/apps/shell_window_geometry_cache_unittest.cc +++ b/apps/shell_window_geometry_cache_unittest.cc @@ -9,7 +9,7 @@ #include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/test_extension_prefs.h" #include "chrome/test/base/testing_profile.h" -#include "content/public/test/test_browser_thread_bundle.h" +#include "content/public/test/test_browser_thread.h" #include "content/public/test/test_utils.h" #include "testing/gtest/include/gtest/gtest.h" @@ -27,9 +27,10 @@ namespace apps { // Base class for tests. class ShellWindowGeometryCacheTest : public testing::Test { public: - ShellWindowGeometryCacheTest() { + ShellWindowGeometryCacheTest() : + ui_thread_(BrowserThread::UI, &ui_message_loop_) { prefs_.reset(new extensions::TestExtensionPrefs( - base::MessageLoopForUI::current()->message_loop_proxy().get())); + ui_message_loop_.message_loop_proxy().get())); cache_.reset(new ShellWindowGeometryCache(&profile_, prefs_->prefs())); cache_->SetSyncDelayForTests(0); } @@ -49,8 +50,9 @@ class ShellWindowGeometryCacheTest : public testing::Test { void UnloadExtension(const std::string& extension_id); protected: - content::TestBrowserThreadBundle thread_bundle_; TestingProfile profile_; + base::MessageLoopForUI ui_message_loop_; + content::TestBrowserThread ui_thread_; scoped_ptr<extensions::TestExtensionPrefs> prefs_; scoped_ptr<ShellWindowGeometryCache> cache_; }; |