Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / common / net / url_fetcher.cc
blob2a46be94c8526fa77975a29452ef57382dd64567
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/public/common/url_fetcher.h"
7 #include "base/bind.h"
8 #include "content/common/net/url_request_user_data.h"
9 #include "net/url_request/url_fetcher.h"
11 namespace content {
13 namespace {
15 base::SupportsUserData::Data* CreateURLRequestUserData(
16 int render_process_id,
17 int render_view_id) {
18 return new URLRequestUserData(render_process_id, render_view_id);
21 } // namespace
23 void AssociateURLFetcherWithRenderView(net::URLFetcher* url_fetcher,
24 const GURL& first_party_for_cookies,
25 int render_process_id,
26 int render_view_id) {
27 url_fetcher->SetFirstPartyForCookies(first_party_for_cookies);
28 url_fetcher->SetURLRequestUserData(
29 URLRequestUserData::kUserDataKey,
30 base::Bind(&CreateURLRequestUserData,
31 render_process_id, render_view_id));
34 } // namespace content