Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: components/keyed_service/core/service_access_type.h

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/keyed_service/core/BUILD.gn ('k') | components/search_engines/template_url_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/keyed_service/core/service_access_type.h
diff --git a/components/keyed_service/core/service_access_type.h b/components/keyed_service/core/service_access_type.h
new file mode 100644
index 0000000000000000000000000000000000000000..257a47d5d4c89bd7584238a66272b5e6d64f8d9c
--- /dev/null
+++ b/components/keyed_service/core/service_access_type.h
@@ -0,0 +1,34 @@
+// Copyright 2015 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.
+
+#ifndef COMPONENTS_KEYED_SERVICE_CORE_SERVICE_ACCESS_TYPE_H_
+#define COMPONENTS_KEYED_SERVICE_CORE_SERVICE_ACCESS_TYPE_H_
+
+// Some KeyedServices are accessed with the following parameter. This parameter
+// defines what the caller plans to do with the service.
+//
+// The caller is responsible for not performing any operation that would
+// result in persistent implicit records while using an OffTheRecord context.
+// This flag allows the context to perform an additional check.
+//
+// It also leaves an opportunity to perform further checks in the future. For
+// example an history service that only allow some specific methods could be
+// returned.
+enum class ServiceAccessType {
+ // The caller plans to perform a read or write that takes place as a result
+ // of the user input. Use this flag when the operation can be performed while
+ // incognito (for example creating a bookmark).
+ //
+ // Since EXPLICIT_ACCESS means "as a result of a user action", this request
+ // always succeeds.
+ EXPLICIT_ACCESS,
+
+ // The caller plans to call a method that will permanently change some data
+ // in the context, as part of Chrome's implicit data logging. Use this flag
+ // before performing an operation which is incompatible with the incognito
+ // mode.
+ IMPLICIT_ACCESS
+};
+
+#endif // COMPONENTS_KEYED_SERVICE_CORE_SERVICE_ACCESS_TYPE_H_
« no previous file with comments | « components/keyed_service/core/BUILD.gn ('k') | components/search_engines/template_url_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698