diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 19:20:42 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 19:20:42 +0000 |
commit | 4f1f3d0f03c79ddaace56f067cf28a27f9466b7d (patch) | |
tree | bc0bcae7b48b6e4e218d4fca358af50467893940 /sandbox/src/win_utils.h | |
parent | 2377f7f26715ae20f671c5fd7e7edee778c1f64f (diff) | |
download | chromium_src-4f1f3d0f03c79ddaace56f067cf28a27f9466b7d.zip chromium_src-4f1f3d0f03c79ddaace56f067cf28a27f9466b7d.tar.gz chromium_src-4f1f3d0f03c79ddaace56f067cf28a27f9466b7d.tar.bz2 |
Improve handling and testing of reparse points.
BUG=28804
TEST=unit tests.
Review URL: http://codereview.chromium.org/553080
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/win_utils.h')
-rw-r--r-- | sandbox/src/win_utils.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sandbox/src/win_utils.h b/sandbox/src/win_utils.h index b3aad3f..c52f3e3 100644 --- a/sandbox/src/win_utils.h +++ b/sandbox/src/win_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2010 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. @@ -30,8 +30,8 @@ class AutoLock { }; private: - DISALLOW_IMPLICIT_CONSTRUCTORS(AutoLock); CRITICAL_SECTION *lock_; + DISALLOW_IMPLICIT_CONSTRUCTORS(AutoLock); }; // Basic implementation of a singleton which calls the destructor @@ -71,6 +71,9 @@ bool ConvertToLongPath(const std::wstring& short_path, std::wstring* long_path); // returns true if any of them is a reparse point. DWORD IsReparsePoint(const std::wstring& full_path, bool* result); +// Returns true if the handle corresponds to the object pointed by this path. +bool SameObject(HANDLE handle, const wchar_t* full_path); + // Resolves a handle to a path. Returns true if the handle can be resolved. bool GetPathFromHandle(HANDLE handle, std::wstring* path); |