summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 22:23:58 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 22:23:58 +0000
commit7d34040372aacc714b5958b6251fdfe1446e5cce (patch)
tree9d30431e9f588b17be26aca0f04a172b59c08073 /chrome/browser
parentb888dfe092bc8ea3e485b606ecc23b73955c2d51 (diff)
downloadchromium_src-7d34040372aacc714b5958b6251fdfe1446e5cce.zip
chromium_src-7d34040372aacc714b5958b6251fdfe1446e5cce.tar.gz
chromium_src-7d34040372aacc714b5958b6251fdfe1446e5cce.tar.bz2
Remove base/scoped_handle_win.h stub and fix up all callers to use the new location and namespace.
BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/aeropeek_manager.cc3
-rw-r--r--chrome/browser/enumerate_modules_model_win.cc6
-rw-r--r--chrome/browser/importer/ie_importer.cc5
-rw-r--r--chrome/browser/memory_details_win.cc9
-rw-r--r--chrome/browser/process_singleton_win.cc7
-rw-r--r--chrome/browser/tab_contents/tab_contents.h8
6 files changed, 23 insertions, 15 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 3e1413a..92ce3b8 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.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.
@@ -12,7 +12,6 @@
#include "app/win/shell.h"
#include "base/command_line.h"
#include "base/scoped_comptr_win.h"
-#include "base/scoped_handle_win.h"
#include "base/scoped_native_library.h"
#include "base/synchronization/waitable_event.h"
#include "base/win/scoped_gdi_object.h"
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc
index f7f7f99..8e8ba0b 100644
--- a/chrome/browser/enumerate_modules_model_win.cc
+++ b/chrome/browser/enumerate_modules_model_win.cc
@@ -14,7 +14,6 @@
#include "base/file_path.h"
#include "base/file_version_info_win.h"
#include "base/metrics/histogram.h"
-#include "base/scoped_handle.h"
#include "base/sha2.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
@@ -23,6 +22,7 @@
#include "base/values.h"
#include "base/version.h"
#include "base/win/registry.h"
+#include "base/win/scoped_handle.h"
#include "chrome/browser/net/service_providers_win.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
@@ -384,8 +384,8 @@ void ModuleEnumerator::ScanImpl() {
void ModuleEnumerator::EnumerateLoadedModules() {
// Get all modules in the current process.
- ScopedHandle snap(::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,
- ::GetCurrentProcessId()));
+ base::win::ScopedHandle snap(::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,
+ ::GetCurrentProcessId()));
if (!snap.Get())
return;
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index 35f4ad4..b26c306 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.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.
@@ -27,6 +27,7 @@
#include "base/values.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
+#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/importer/importer_bridge.h"
@@ -49,7 +50,7 @@ namespace {
// Gets the creation time of the given file or directory.
static Time GetFileCreationTime(const std::wstring& file) {
Time creation_time;
- ScopedHandle file_handle(
+ base::win::ScopedHandle file_handle(
CreateFile(file.c_str(), GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING,
diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc
index d49a852..4684fd0 100644
--- a/chrome/browser/memory_details_win.cc
+++ b/chrome/browser/memory_details_win.cc
@@ -1,8 +1,9 @@
-// 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.
#include "chrome/browser/memory_details.h"
+
#include <psapi.h>
#include "app/l10n_util.h"
@@ -10,6 +11,7 @@
#include "base/file_version_info.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_handle.h"
#include "chrome/browser/browser_child_process_host.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/renderer_host/backing_store_manager.h"
@@ -74,7 +76,8 @@ void MemoryDetails::CollectProcessData(
bool is_64bit_os =
system_info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64;
- ScopedHandle snapshot(::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0));
+ base::win::ScopedHandle snapshot(
+ ::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0));
PROCESSENTRY32 process_entry = {sizeof(PROCESSENTRY32)};
if (!snapshot.Get()) {
LOG(ERROR) << "CreateToolhelp32Snaphot failed: " << GetLastError();
@@ -86,7 +89,7 @@ void MemoryDetails::CollectProcessData(
}
do {
base::ProcessId pid = process_entry.th32ProcessID;
- ScopedHandle handle(::OpenProcess(
+ base::win::ScopedHandle handle(::OpenProcess(
PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid));
if (!handle.Get())
continue;
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index a52700e..47e28dd 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.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.
@@ -11,8 +11,8 @@
#include "base/file_path.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/scoped_handle.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_handle.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extensions_startup.h"
#include "chrome/browser/platform_util.h"
@@ -53,7 +53,8 @@ ProcessSingleton::ProcessSingleton(const FilePath& user_data_dir)
// since it isn't guaranteed we will get it. It is better to create it
// without ownership and explicitly get the ownership afterward.
std::wstring mutex_name(L"Local\\ChromeProcessSingletonStartup!");
- ScopedHandle only_me(CreateMutex(NULL, FALSE, mutex_name.c_str()));
+ base::win::ScopedHandle only_me(
+ CreateMutex(NULL, FALSE, mutex_name.c_str()));
DCHECK(only_me.Get() != NULL) << "GetLastError = " << GetLastError();
// This is how we acquire the mutex (as opposed to the initial ownership).
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 79ab5f7..7ef622c 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -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.
@@ -39,6 +39,10 @@
#include "gfx/native_widget_types.h"
#include "net/base/load_states.h"
+#if defined(OS_WIN)
+#include "base/win/scoped_handle.h"
+#endif
+
namespace gfx {
class Rect;
}
@@ -1280,7 +1284,7 @@ class TabContents : public PageNavigator,
// Handle to an event that's set when the page is showing a message box (or
// equivalent constrained window). Plugin processes check this to know if
// they should pump messages then.
- ScopedHandle message_box_active_;
+ base::win::ScopedHandle message_box_active_;
#endif
// The time that the last javascript message was dismissed.