Roll src/third_party/skia c64137c:b5fb5af
[chromium-blink-merge.git] / components / keyed_service / core / service_access_type.h
blob257a47d5d4c89bd7584238a66272b5e6d64f8d9c
1 // Copyright 2015 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 #ifndef COMPONENTS_KEYED_SERVICE_CORE_SERVICE_ACCESS_TYPE_H_
6 #define COMPONENTS_KEYED_SERVICE_CORE_SERVICE_ACCESS_TYPE_H_
8 // Some KeyedServices are accessed with the following parameter. This parameter
9 // defines what the caller plans to do with the service.
11 // The caller is responsible for not performing any operation that would
12 // result in persistent implicit records while using an OffTheRecord context.
13 // This flag allows the context to perform an additional check.
15 // It also leaves an opportunity to perform further checks in the future. For
16 // example an history service that only allow some specific methods could be
17 // returned.
18 enum class ServiceAccessType {
19 // The caller plans to perform a read or write that takes place as a result
20 // of the user input. Use this flag when the operation can be performed while
21 // incognito (for example creating a bookmark).
23 // Since EXPLICIT_ACCESS means "as a result of a user action", this request
24 // always succeeds.
25 EXPLICIT_ACCESS,
27 // The caller plans to call a method that will permanently change some data
28 // in the context, as part of Chrome's implicit data logging. Use this flag
29 // before performing an operation which is incompatible with the incognito
30 // mode.
31 IMPLICIT_ACCESS
34 #endif // COMPONENTS_KEYED_SERVICE_CORE_SERVICE_ACCESS_TYPE_H_