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

Unified Diff: chrome/browser/dom_ui/new_tab_page_sync_handler.cc

Issue 258008: Move initialization of ChromeURLRequestContexts to the IO thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again, just in case Created 11 years, 2 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
« no previous file with comments | « chrome/browser/cookies_table_model.cc ('k') | chrome/browser/download/download_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_page_sync_handler.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_page_sync_handler.cc (revision 29872)
+++ chrome/browser/dom_ui/new_tab_page_sync_handler.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/json_writer.h"
#include "base/string_util.h"
#include "base/values.h"
+#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -51,8 +52,9 @@
bool IsGoogleGAIACookieInstalled() {
for (size_t i = 0; i < arraysize(kGAIACookieFilters); ++i) {
- URLRequestContext* context = Profile::GetDefaultRequestContext();
- net::CookieStore* store = context->cookie_store();
+ // Since we are running on the UI thread don't call GetURLRequestContext().
+ net::CookieStore* store =
+ Profile::GetDefaultRequestContext()->GetCookieStore();
GURL url(kGAIACookieFilters[i].url);
net::CookieOptions options;
options.set_include_httponly(); // The SID cookie might be httponly.
« no previous file with comments | « chrome/browser/cookies_table_model.cc ('k') | chrome/browser/download/download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698