summaryrefslogtreecommitdiff
path: root/chromium/content/browser/cache_storage/cache_storage.proto
blob: e7ef4b482b97535b26a0bd85c697806a18edae3d (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2014 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.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package content;

message CacheStorageIndex {
  message Cache { required string name = 1; }
  repeated Cache cache = 1;
  optional string origin = 2;
}

message CacheHeaderMap {
  required string name = 1;
  required string value = 2;
}

message CacheRequest {
  required string method = 1;
  repeated CacheHeaderMap headers = 2;
}

message CacheResponse {
  enum ResponseType {
    BASIC_TYPE = 0;
    CORS_TYPE = 1;
    DEFAULT_TYPE = 2;
    ERROR_TYPE = 3;
    OPAQUE_TYPE = 4;
    OPAQUE_REDIRECT_TYPE = 5;
  }

  required int32 status_code = 1;
  required string status_text = 2;
  required ResponseType response_type = 3;
  repeated CacheHeaderMap headers = 4;
  optional string url = 5;
}

message CacheMetadata {
  required CacheRequest request = 1;
  required CacheResponse response = 2;
}