chromium/components/services/storage/indexed_db/scopes/scopes_metadata.proto

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";

option optimize_for = LITE_RUNTIME;

package content;

message LevelDBScopesKey {
  bytes key = 1;
  // Deprecated end which stopped being used in m109.
  reserved 2;
}

message LevelDBScopesMetadata {
  int64 version = 1;
}

message LevelDBScopesScopeMetadata {
  message LevelDBPartitionedLock {
    int64 partition = 1;
    LevelDBScopesKey key = 2;
  }
  repeated LevelDBPartitionedLock locks = 1;

  // If this is true, don't execute cleanup tasks when cleaning up this scope.
  bool ignore_cleanup_tasks = 2;
}

message LevelDBScopesUndoTask {
  message Put {
    bytes key = 1;
    bytes value = 2;
  }
  message Delete { bytes key = 1; }
  message DeleteRange {
    bytes begin = 1;
    bytes end = 2;
  }
  oneof operation {
    Put put = 1;
    Delete delete = 2;
    DeleteRange delete_range = 3;
  }
}

message LevelDBScopesCleanupTask {
  message DeleteRange {
    bytes begin = 1;
    bytes end = 2;
  }
  oneof operation {
    DeleteRange delete_range = 1;
    DeleteRange delete_range_and_compact = 2;
  }
}