blob: 3f908af22b3d9a4b0d662ca6202e34b824fed2fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/appcache/view_appcache_internals_job_factory.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/common/url_constants.h"
#include "webkit/appcache/appcache_service.h"
#include "webkit/appcache/view_appcache_internals_job.h"
// static.
bool ViewAppCacheInternalsJobFactory::IsSupportedURL(const GURL& url) {
return StartsWithASCII(url.spec(),
chrome::kAppCacheViewInternalsURL,
true /*case_sensitive*/);
}
// static.
URLRequestJob* ViewAppCacheInternalsJobFactory::CreateJobForRequest(
URLRequest* request) {
URLRequestContext* context = request->context();
ChromeURLRequestContext* chrome_request_context =
reinterpret_cast<ChromeURLRequestContext*>(context);
return new appcache::ViewAppCacheInternalsJob(
request, chrome_request_context->appcache_service());
}
|