summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-09 16:32:20 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-09 16:32:20 +0000
commitb90d7e80c20c7c20831bedfe3fa6028ddab1ae95 (patch)
tree308e927055c27a533019d329a9677ce8e7c53e33 /base/win
parentd716d4178136a223e9e79b3508c755a71108a068 (diff)
downloadchromium_src-b90d7e80c20c7c20831bedfe3fa6028ddab1ae95.zip
chromium_src-b90d7e80c20c7c20831bedfe3fa6028ddab1ae95.tar.gz
chromium_src-b90d7e80c20c7c20831bedfe3fa6028ddab1ae95.tar.bz2
Reland "Remove base/scoped_handle_win.h."
Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r--base/win/event_trace_consumer_unittest.cc16
-rw-r--r--base/win/event_trace_controller_unittest.cc14
-rw-r--r--base/win/win_util.cc6
3 files changed, 20 insertions, 16 deletions
diff --git a/base/win/event_trace_consumer_unittest.cc b/base/win/event_trace_consumer_unittest.cc
index f11f459..efbfdf9 100644
--- a/base/win/event_trace_consumer_unittest.cc
+++ b/base/win/event_trace_consumer_unittest.cc
@@ -4,14 +4,16 @@
//
// Unit tests for event trace consumer_ base class.
#include "base/win/event_trace_consumer.h"
+
#include <list>
+
#include "base/basictypes.h"
-#include "base/win/event_trace_controller.h"
-#include "base/win/event_trace_provider.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/scoped_handle.h"
+#include "base/win/event_trace_controller.h"
+#include "base/win/event_trace_provider.h"
+#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include <initguid.h> // NOLINT - has to be last
@@ -63,14 +65,14 @@ class TestConsumer: public EtwTraceConsumerBase<TestConsumer> {
::SetEvent(sank_event_.Get());
}
- static ScopedHandle sank_event_;
+ static base::win::ScopedHandle sank_event_;
static EventQueue events_;
private:
DISALLOW_COPY_AND_ASSIGN(TestConsumer);
};
-ScopedHandle TestConsumer::sank_event_;
+base::win::ScopedHandle TestConsumer::sank_event_;
EventQueue TestConsumer::events_;
const wchar_t* const kTestSessionName = L"TestLogSession";
@@ -175,8 +177,8 @@ class EtwTraceConsumerRealtimeTest: public testing::Test {
}
TestConsumer consumer_;
- ScopedHandle consumer_ready_;
- ScopedHandle consumer_thread_;
+ base::win::ScopedHandle consumer_ready_;
+ base::win::ScopedHandle consumer_thread_;
};
} // namespace
diff --git a/base/win/event_trace_controller_unittest.cc b/base/win/event_trace_controller_unittest.cc
index 2b3cd66..8eab40a 100644
--- a/base/win/event_trace_controller_unittest.cc
+++ b/base/win/event_trace_controller_unittest.cc
@@ -1,17 +1,19 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
//
// Unit tests for event trace controller.
-#include "base/win/event_trace_controller.h"
-#include "base/win/event_trace_provider.h"
+
+#include <initguid.h> // NOLINT.
+
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/scoped_handle.h"
#include "base/sys_info.h"
+#include "base/win/event_trace_controller.h"
+#include "base/win/event_trace_provider.h"
+#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include <initguid.h> // NOLINT - must be last.
namespace {
@@ -50,7 +52,7 @@ class TestingProvider: public EtwTraceProvider {
::SetEvent(callback_event_.Get());
}
- ScopedHandle callback_event_;
+ base::win::ScopedHandle callback_event_;
DISALLOW_COPY_AND_ASSIGN(TestingProvider);
};
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index afd16f4..87905ea 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -13,11 +13,11 @@
#include "base/logging.h"
#include "base/win/registry.h"
-#include "base/scoped_handle.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/threading/thread_restrictions.h"
+#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
namespace base {
@@ -47,7 +47,7 @@ bool GetUserSidString(std::wstring* user_sid) {
HANDLE token = NULL;
if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, &token))
return false;
- ScopedHandle token_scoped(token);
+ base::win::ScopedHandle token_scoped(token);
DWORD size = sizeof(TOKEN_USER) + SECURITY_MAX_SID_SIZE;
scoped_array<BYTE> user_bytes(new BYTE[size]);