From 20402235d708145f61c1fe41a4d7b8ddc35a15be Mon Sep 17 00:00:00 2001 From: "grt@chromium.org" Date: Thu, 14 Nov 2013 07:43:20 +0000 Subject: Use RegistryOverrideManager properly in RLZ tests. Previously, rlz/test/rlz_test_helpers.cc and chrome/browser/rlz/rlz_unittest.cc each did somewhat different things to prepare the registry for tests. Now, rlz_test_helpers.cc does the prep the right way using RegistryOverrideManager and rlz_unittests.cc uses rlz_test_helpers.cc. This unblocks the refactor in r234367 that was reverted in r234627. BUG=314800 R=rogerta@chromium.org, tommycli@chromium.org Review URL: https://codereview.chromium.org/63153009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235090 0039d316-1c4b-4281-b951-d872f2087c98 --- rlz/lib/rlz_lib.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'rlz/lib') diff --git a/rlz/lib/rlz_lib.h b/rlz/lib/rlz_lib.h index 1f8be5c..6e3f451 100644 --- a/rlz/lib/rlz_lib.h +++ b/rlz/lib/rlz_lib.h @@ -52,6 +52,22 @@ class URLRequestContextGetter; namespace rlz_lib { +// All functions return true on success and false on error. +// This implemenation is thread safe. +// +// Each prototype mentions the registry access requirements: +// +// HKLM read: Will work from any process and at any privilege level on Vista. +// HKCU read: Calls made from the SYSTEM account must pass the current user's +// SID as the optional 'sid' param. Can be called from low integrity +// process on Vista. +// HKCU write: Calls made from the SYSTEM account must pass the current user's +// SID as the optional 'sid' param. Calls require at least medium +// integrity on Vista (e.g. Toolbar will need to use their broker) +// HKLM write: Calls must be made from an account with admin rights. No SID +// need be passed when running as SYSTEM. +// Functions which do not access registry will be marked with "no restrictions". + class ScopedRlzValueStoreLock; // The maximum length of an access points RLZ in bytes. -- cgit v1.1