summaryrefslogtreecommitdiffstats
path: root/ceee
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 08:18:55 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 08:18:55 +0000
commit8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a (patch)
treea7425d106d83f1f031516e18ea9600363341fdb8 /ceee
parent1bc1c69f95dab2c34232a5c8793cf9db51af2386 (diff)
downloadchromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.zip
chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.tar.gz
chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.tar.bz2
Rename all methods accessing Singleton<T> as GetInstance().
This is in preparation to a subsequent CL where Singleton<T> will restrict access to only the type being made singleton. I also moved pepper::ResourceTracker to a lazy instance since there were too many places in code where this class was being accessed from and this was a smaller change than renaming methods in that case. BUG=65298 TEST=all existing tests should pass. Review URL: http://codereview.chromium.org/5685007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-rw-r--r--ceee/common/process_utils_win.cc12
-rw-r--r--ceee/common/process_utils_win.h2
-rw-r--r--ceee/ie/broker/executors_manager.cc6
3 files changed, 12 insertions, 8 deletions
diff --git a/ceee/common/process_utils_win.cc b/ceee/common/process_utils_win.cc
index 094af1e..80df821 100644
--- a/ceee/common/process_utils_win.cc
+++ b/ceee/common/process_utils_win.cc
@@ -130,6 +130,11 @@ ProcessCompatibilityCheck::ProcessCompatibilityCheck()
StandardInitialize();
}
+// static
+ProcessCompatibilityCheck* ProcessCompatibilityCheck::GetInstance() {
+ return Singleton<ProcessCompatibilityCheck>::get();
+}
+
void ProcessCompatibilityCheck::StandardInitialize() {
HRESULT hr = S_OK;
@@ -199,8 +204,7 @@ HRESULT ProcessCompatibilityCheck::IsCompatible(HWND process_window,
HRESULT ProcessCompatibilityCheck::IsCompatible(DWORD process_id,
bool* is_compatible) {
- ProcessCompatibilityCheck* instance
- = Singleton<ProcessCompatibilityCheck>::get();
+ ProcessCompatibilityCheck* instance = GetInstance();
DCHECK(instance != NULL);
DCHECK(is_compatible != NULL);
@@ -306,7 +310,7 @@ void ProcessCompatibilityCheck::PatchState(
CloseHandleFuncType close_handle_func,
IsWOW64ProcessFuncType is_wow64_process_func) {
PatchState(open_process_func, close_handle_func, is_wow64_process_func);
- Singleton<ProcessCompatibilityCheck>::get()->KnownStateInitialize(
+ GetInstance()->KnownStateInitialize(
system_type, current_process_wow64,
check_integrity, current_process_integrity);
}
@@ -324,7 +328,7 @@ void ProcessCompatibilityCheck::PatchState(
void ProcessCompatibilityCheck::ResetState() {
PatchState(OpenProcess, CloseHandle, IsWow64Process);
- Singleton<ProcessCompatibilityCheck>::get()->StandardInitialize();
+ GetInstance()->StandardInitialize();
}
} // namespace com
diff --git a/ceee/common/process_utils_win.h b/ceee/common/process_utils_win.h
index e928791..6b036a4 100644
--- a/ceee/common/process_utils_win.h
+++ b/ceee/common/process_utils_win.h
@@ -51,6 +51,8 @@ HRESULT IsCurrentProcessUacElevated(bool* running_as_admin);
// with implementation.
class ProcessCompatibilityCheck {
public:
+ static ProcessCompatibilityCheck* GetInstance();
+
// Is the process associated with the given window compatible with the
// current process. If the call returns an error code, the value of
// *is_compatible is undefined.
diff --git a/ceee/ie/broker/executors_manager.cc b/ceee/ie/broker/executors_manager.cc
index 4e2c32d..2256dbc 100644
--- a/ceee/ie/broker/executors_manager.cc
+++ b/ceee/ie/broker/executors_manager.cc
@@ -75,8 +75,7 @@ ExecutorsManager* ExecutorsManager::GetInstance() {
}
bool ExecutorsManager::IsKnownWindow(HWND window) {
- return Singleton<ExecutorsManager, ExecutorsManager::SingletonTraits>::get()->
- IsKnownWindowImpl(window);
+ return GetInstance()->IsKnownWindowImpl(window);
}
bool ExecutorsManager::IsKnownWindowImpl(HWND window) {
@@ -86,8 +85,7 @@ bool ExecutorsManager::IsKnownWindowImpl(HWND window) {
}
HWND ExecutorsManager::FindTabChild(HWND window) {
- return Singleton<ExecutorsManager, ExecutorsManager::SingletonTraits>::get()->
- FindTabChildImpl(window);
+ return GetInstance()->FindTabChildImpl(window);
}
HWND ExecutorsManager::FindTabChildImpl(HWND window) {