summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/active_window_watcher_x.cc9
-rw-r--r--app/active_window_watcher_x.h2
-rw-r--r--app/surface/io_surface_support_mac.cc6
-rw-r--r--base/debug/stack_trace_win.cc4
-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
-rw-r--r--chrome/browser/about_flags.cc12
-rw-r--r--chrome/browser/background_page_tracker.cc2
-rw-r--r--chrome/browser/background_page_tracker.h2
-rw-r--r--chrome/browser/browser_about_handler.cc8
-rw-r--r--chrome/browser/browser_main.cc5
-rw-r--r--chrome/browser/browser_process_impl.cc6
-rw-r--r--chrome/browser/browser_shutdown.cc2
-rw-r--r--chrome/browser/cert_store.cc2
-rw-r--r--chrome/browser/cert_store.h2
-rw-r--r--chrome/browser/certificate_viewer.cc2
-rw-r--r--chrome/browser/chrome_plugin_browsing_context.cc2
-rw-r--r--chrome/browser/chrome_plugin_browsing_context.h2
-rw-r--r--chrome/browser/chrome_plugin_host.cc6
-rw-r--r--chrome/browser/chromeos/gview_request_interceptor.cc2
-rw-r--r--chrome/browser/chromeos/gview_request_interceptor.h2
-rw-r--r--chrome/browser/chromeos/gview_request_interceptor_unittest.cc2
-rw-r--r--chrome/browser/dom_ui/conflicts_ui.cc4
-rw-r--r--chrome/browser/dom_ui/plugins_ui.cc4
-rw-r--r--chrome/browser/enumerate_modules_model_win.cc5
-rw-r--r--chrome/browser/enumerate_modules_model_win.h4
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc2
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.h2
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.cc12
-rw-r--r--chrome/browser/extensions/extension_host.cc6
-rw-r--r--chrome/browser/extensions/extensions_service.cc2
-rw-r--r--chrome/browser/gpu_process_host.cc2
-rw-r--r--chrome/browser/gpu_process_host_ui_shim.cc2
-rw-r--r--chrome/browser/gpu_process_host_ui_shim.h2
-rw-r--r--chrome/browser/metrics/metrics_log.cc10
-rw-r--r--chrome/browser/net/metadata_url_request.cc2
-rw-r--r--chrome/browser/page_info_model.cc2
-rw-r--r--chrome/browser/parsers/metadata_parser_manager.cc11
-rw-r--r--chrome/browser/parsers/metadata_parser_manager.h2
-rw-r--r--chrome/browser/plugin_process_host.cc5
-rw-r--r--chrome/browser/plugin_service.cc2
-rw-r--r--chrome/browser/plugin_updater.cc6
-rw-r--r--chrome/browser/plugin_updater.h2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc8
-rw-r--r--chrome/browser/remoting/remoting_setup_flow.cc2
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc3
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc10
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--chrome/browser/service/service_process_control_browsertest.cc10
-rw-r--r--chrome/browser/service/service_process_control_manager.cc2
-rw-r--r--chrome/browser/service/service_process_control_manager.h2
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc2
-rw-r--r--chrome/browser/ssl/ssl_error_info.cc2
-rw-r--r--chrome/browser/ui/browser_init.cc2
-rw-r--r--chrome/browser/ui/cocoa/about_ipc_controller.mm9
-rw-r--r--chrome/browser/ui/cocoa/page_info_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.cc4
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc14
-rw-r--r--chrome/browser/ui/views/about_ipc_dialog.cc4
-rw-r--r--chrome/browser/ui/views/accessible_pane_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/ui/views/html_dialog_view_browsertest.cc10
-rw-r--r--chrome/browser/ui/views/page_info_bubble_view.cc2
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc8
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc8
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc8
-rw-r--r--chrome/common/child_process_host.cc4
-rw-r--r--chrome/common/child_thread.cc8
-rw-r--r--chrome/common/extensions/extension.cc8
-rw-r--r--chrome/service/service_ipc_server.cc4
-rw-r--r--chrome/test/gpu/gpu_pixel_browsertest.cc2
-rw-r--r--chrome_frame/chrome_frame_activex.cc6
-rw-r--r--chrome_frame/chrome_frame_activex_base.h2
-rw-r--r--chrome_frame/simple_resource_loader.cc6
-rw-r--r--chrome_frame/simple_resource_loader.h2
-rw-r--r--chrome_frame/test/simple_resource_loader_test.cc2
-rw-r--r--ipc/ipc_channel_posix.cc2
-rw-r--r--ipc/ipc_channel_proxy.cc6
-rw-r--r--ipc/ipc_channel_win.cc2
-rw-r--r--ipc/ipc_logging.cc2
-rw-r--r--ipc/ipc_logging.h2
-rw-r--r--net/base/registry_controlled_domain.h10
-rw-r--r--views/focus/external_focus_tracker.cc2
-rw-r--r--views/focus/focus_manager.cc8
-rw-r--r--views/focus/view_storage.cc2
-rw-r--r--views/focus/view_storage.h2
-rw-r--r--views/view_unittest.cc2
-rw-r--r--views/widget/root_view.cc2
-rw-r--r--webkit/appcache/appcache_interceptor.cc9
-rw-r--r--webkit/appcache/appcache_interceptor.h8
-rw-r--r--webkit/glue/webkitclient_impl.cc4
92 files changed, 220 insertions, 196 deletions
diff --git a/app/active_window_watcher_x.cc b/app/active_window_watcher_x.cc
index 9b861e6..65749648 100644
--- a/app/active_window_watcher_x.cc
+++ b/app/active_window_watcher_x.cc
@@ -11,13 +11,18 @@
static Atom kNetActiveWindowAtom = None;
// static
+ActiveWindowWatcherX* ActiveWindowWatcherX::GetInstance() {
+ return Singleton<ActiveWindowWatcherX>::get();
+}
+
+// static
void ActiveWindowWatcherX::AddObserver(Observer* observer) {
- Singleton<ActiveWindowWatcherX>::get()->observers_.AddObserver(observer);
+ GetInstance()->observers_.AddObserver(observer);
}
// static
void ActiveWindowWatcherX::RemoveObserver(Observer* observer) {
- Singleton<ActiveWindowWatcherX>::get()->observers_.RemoveObserver(observer);
+ GetInstance()->observers_.RemoveObserver(observer);
}
ActiveWindowWatcherX::ActiveWindowWatcherX() {
diff --git a/app/active_window_watcher_x.h b/app/active_window_watcher_x.h
index e93ea1c..e54ee3c 100644
--- a/app/active_window_watcher_x.h
+++ b/app/active_window_watcher_x.h
@@ -35,6 +35,8 @@ class ActiveWindowWatcherX {
ActiveWindowWatcherX();
~ActiveWindowWatcherX();
+ static ActiveWindowWatcherX* GetInstance();
+
void Init();
// Sends a notification out through the NotificationService that the active
diff --git a/app/surface/io_surface_support_mac.cc b/app/surface/io_surface_support_mac.cc
index b27a544..28eb18a 100644
--- a/app/surface/io_surface_support_mac.cc
+++ b/app/surface/io_surface_support_mac.cc
@@ -26,7 +26,7 @@ typedef CGLError (*CGLTexImageIOSurface2DProcPtr)(CGLContextObj ctx,
class IOSurfaceSupportImpl : public IOSurfaceSupport {
public:
- static IOSurfaceSupportImpl* Initialize();
+ static IOSurfaceSupportImpl* GetInstance();
bool InitializedSuccessfully() {
return initialized_successfully_;
@@ -80,7 +80,7 @@ class IOSurfaceSupportImpl : public IOSurfaceSupport {
DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupportImpl);
};
-IOSurfaceSupportImpl* IOSurfaceSupportImpl::Initialize() {
+IOSurfaceSupportImpl* IOSurfaceSupportImpl::GetInstance() {
IOSurfaceSupportImpl* impl = Singleton<IOSurfaceSupportImpl>::get();
if (impl->InitializedSuccessfully())
return impl;
@@ -259,7 +259,7 @@ IOSurfaceSupportImpl::~IOSurfaceSupportImpl() {
}
IOSurfaceSupport* IOSurfaceSupport::Initialize() {
- return IOSurfaceSupportImpl::Initialize();
+ return IOSurfaceSupportImpl::GetInstance();
}
IOSurfaceSupport::IOSurfaceSupport() {
diff --git a/base/debug/stack_trace_win.cc b/base/debug/stack_trace_win.cc
index 653d234..6f4ad02 100644
--- a/base/debug/stack_trace_win.cc
+++ b/base/debug/stack_trace_win.cc
@@ -36,7 +36,7 @@ namespace {
// just ignore it.
class SymbolContext {
public:
- static SymbolContext* Get() {
+ static SymbolContext* GetInstance() {
// We use a leaky singleton because code may call this during process
// termination.
return
@@ -179,7 +179,7 @@ void StackTrace::PrintBacktrace() {
}
void StackTrace::OutputToStream(std::ostream* os) {
- SymbolContext* context = SymbolContext::Get();
+ SymbolContext* context = SymbolContext::GetInstance();
DWORD error = context->init_error();
if (error != ERROR_SUCCESS) {
(*os) << "Error initializing symbols (" << error
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) {
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 15d9cb2..b87f4217a 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -305,7 +305,7 @@ class FlagsState {
void reset();
// Returns the singleton instance of this class
- static FlagsState* instance() {
+ static FlagsState* GetInstance() {
return Singleton<FlagsState>::get();
}
@@ -467,7 +467,7 @@ Value* CreateChoiceData(const Experiment& experiment,
} // namespace
void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
- FlagsState::instance()->ConvertFlagsToSwitches(prefs, command_line);
+ FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
}
ListValue* GetFlagsExperimentsData(PrefService* prefs) {
@@ -504,17 +504,17 @@ ListValue* GetFlagsExperimentsData(PrefService* prefs) {
}
bool IsRestartNeededToCommitChanges() {
- return FlagsState::instance()->IsRestartNeededToCommitChanges();
+ return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
}
void SetExperimentEnabled(
PrefService* prefs, const std::string& internal_name, bool enable) {
- FlagsState::instance()->SetExperimentEnabled(prefs, internal_name, enable);
+ FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
}
void RemoveFlagsSwitches(
std::map<std::string, CommandLine::StringType>* switch_list) {
- FlagsState::instance()->RemoveFlagsSwitches(switch_list);
+ FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
}
int GetCurrentPlatform() {
@@ -683,7 +683,7 @@ namespace testing {
const char kMultiSeparator[] = "@";
void ClearState() {
- FlagsState::instance()->reset();
+ FlagsState::GetInstance()->reset();
}
void SetExperiments(const Experiment* e, size_t count) {
diff --git a/chrome/browser/background_page_tracker.cc b/chrome/browser/background_page_tracker.cc
index 0cd2a4c..75fe3c9b 100644
--- a/chrome/browser/background_page_tracker.cc
+++ b/chrome/browser/background_page_tracker.cc
@@ -42,7 +42,7 @@ void BackgroundPageTracker::RegisterPrefs(PrefService* prefs) {
}
// static
-BackgroundPageTracker* BackgroundPageTracker::GetSingleton() {
+BackgroundPageTracker* BackgroundPageTracker::GetInstance() {
return Singleton<BackgroundPageTracker>::get();
}
diff --git a/chrome/browser/background_page_tracker.h b/chrome/browser/background_page_tracker.h
index 2b3b90c..e66c961 100644
--- a/chrome/browser/background_page_tracker.h
+++ b/chrome/browser/background_page_tracker.h
@@ -27,7 +27,7 @@ class BackgroundPageTracker : public NotificationObserver {
static void RegisterPrefs(PrefService* prefs);
// Convenience routine which gets the singleton object.
- static BackgroundPageTracker* GetSingleton();
+ static BackgroundPageTracker* GetInstance();
// Returns the number of background apps/extensions currently loaded.
int GetBackgroundPageCount();
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index d37a100..d76163c 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -764,14 +764,14 @@ void DxDiagNodeToHTML(std::string* output, const DxDiagNode& node) {
}
std::string AboutGpu() {
- const GPUInfo& gpu_info = GpuProcessHostUIShim::Get()->gpu_info();
+ const GPUInfo& gpu_info = GpuProcessHostUIShim::GetInstance()->gpu_info();
std::string html;
html.append("<html><head><title>About GPU</title></head>\n");
if (gpu_info.progress() != GPUInfo::kComplete) {
- GpuProcessHostUIShim::Get()->CollectGraphicsInfoAsynchronously();
+ GpuProcessHostUIShim::GetInstance()->CollectGraphicsInfoAsynchronously();
// If it's not fully initialized yet, set a timeout to reload the page.
html.append("<body onload=\"setTimeout('window.location.reload(true)',");
@@ -1166,11 +1166,11 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) {
// Handle URLs to wreck the gpu process.
if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuCrashURL)) {
- GpuProcessHostUIShim::Get()->SendAboutGpuCrash();
+ GpuProcessHostUIShim::GetInstance()->SendAboutGpuCrash();
return true;
}
if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuHangURL)) {
- GpuProcessHostUIShim::Get()->SendAboutGpuHang();
+ GpuProcessHostUIShim::GetInstance()->SendAboutGpuHang();
return true;
}
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 82c2ac2..d5b6d7f 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1598,8 +1598,9 @@ int BrowserMain(const MainFunctionParams& parameters) {
// TODO(hclam): Need to check for cloud print proxy too.
if (parsed_command_line.HasSwitch(switches::kEnableRemoting)) {
if (user_prefs->GetBoolean(prefs::kRemotingHasSetupCompleted)) {
- ServiceProcessControl* control = ServiceProcessControlManager::instance()
- ->GetProcessControl(profile);
+ ServiceProcessControl* control =
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(
+ profile);
control->Launch(NULL, NULL);
}
}
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index ea52797..53d44d8 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -657,7 +657,7 @@ void BrowserProcessImpl::CreateLocalState() {
// in the plugin blacklist.
local_state_->RegisterListPref(prefs::kPluginsPluginsBlacklist);
pref_change_registrar_.Add(prefs::kPluginsPluginsBlacklist,
- PluginUpdater::GetPluginUpdater());
+ PluginUpdater::GetInstance());
// Initialize and set up notifications for the printing enabled
// preference.
@@ -764,9 +764,9 @@ DISABLE_RUNNABLE_METHOD_REFCOUNT(BrowserProcessImpl);
void BrowserProcessImpl::SetIPCLoggingEnabled(bool enable) {
// First enable myself.
if (enable)
- IPC::Logging::current()->Enable();
+ IPC::Logging::GetInstance()->Enable();
else
- IPC::Logging::current()->Disable();
+ IPC::Logging::GetInstance()->Disable();
// Now tell subprocesses. Messages to ChildProcess-derived
// processes must be done on the IO thread.
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index e136ef8..d115cf5 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -121,7 +121,7 @@ void Shutdown() {
NewRunnableFunction(&ChromePluginLib::UnloadAllPlugins));
// Shutdown all IPC channels to service processes.
- ServiceProcessControlManager::instance()->Shutdown();
+ ServiceProcessControlManager::GetInstance()->Shutdown();
// WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough
// time to get here. If you have something that *must* happen on end session,
diff --git a/chrome/browser/cert_store.cc b/chrome/browser/cert_store.cc
index 8c2d021..30ef867 100644
--- a/chrome/browser/cert_store.cc
+++ b/chrome/browser/cert_store.cc
@@ -24,7 +24,7 @@ struct MatchSecond {
};
// static
-CertStore* CertStore::GetSharedInstance() {
+CertStore* CertStore::GetInstance() {
return Singleton<CertStore>::get();
}
diff --git a/chrome/browser/cert_store.h b/chrome/browser/cert_store.h
index fc17501..0af7ef4 100644
--- a/chrome/browser/cert_store.h
+++ b/chrome/browser/cert_store.h
@@ -27,7 +27,7 @@
class CertStore : public NotificationObserver {
public:
// Returns the singleton instance of the CertStore.
- static CertStore* GetSharedInstance();
+ static CertStore* GetInstance();
// Stores the specified cert and returns the id associated with it. The cert
// is associated to the specified RenderProcessHost.
diff --git a/chrome/browser/certificate_viewer.cc b/chrome/browser/certificate_viewer.cc
index 677c81f..73cc4d5c 100644
--- a/chrome/browser/certificate_viewer.cc
+++ b/chrome/browser/certificate_viewer.cc
@@ -8,7 +8,7 @@
void ShowCertificateViewerByID(gfx::NativeWindow parent, int cert_id) {
scoped_refptr<net::X509Certificate> cert;
- CertStore::GetSharedInstance()->RetrieveCert(cert_id, &cert);
+ CertStore::GetInstance()->RetrieveCert(cert_id, &cert);
if (!cert.get()) {
// The certificate was not found. Could be that the renderer crashed before
// we displayed the page info.
diff --git a/chrome/browser/chrome_plugin_browsing_context.cc b/chrome/browser/chrome_plugin_browsing_context.cc
index 34fe815..3ff4729 100644
--- a/chrome/browser/chrome_plugin_browsing_context.cc
+++ b/chrome/browser/chrome_plugin_browsing_context.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/common/notification_service.h"
-CPBrowsingContextManager* CPBrowsingContextManager::Instance() {
+CPBrowsingContextManager* CPBrowsingContextManager::GetInstance() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
return Singleton<CPBrowsingContextManager>::get();
}
diff --git a/chrome/browser/chrome_plugin_browsing_context.h b/chrome/browser/chrome_plugin_browsing_context.h
index ef31262..45d24f3 100644
--- a/chrome/browser/chrome_plugin_browsing_context.h
+++ b/chrome/browser/chrome_plugin_browsing_context.h
@@ -23,7 +23,7 @@ class URLRequestContext;
// Note: This class should be used on the IO thread only.
class CPBrowsingContextManager : public NotificationObserver {
public:
- static CPBrowsingContextManager* Instance();
+ static CPBrowsingContextManager* GetInstance();
// Note: don't call these directly - use Instance() above. They are public
// so Singleton can access them.
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc
index 9248036..b339b46 100644
--- a/chrome/browser/chrome_plugin_host.cc
+++ b/chrome/browser/chrome_plugin_host.cc
@@ -109,7 +109,7 @@ class PluginRequestInterceptor
return NULL;
CPBrowsingContext context =
- CPBrowsingContextManager::Instance()->Lookup(request->context());
+ CPBrowsingContextManager::GetInstance()->Lookup(request->context());
scoped_ptr<ScopableCPRequest> cprequest(
new ScopableCPRequest(request->url().spec().c_str(),
request->method().c_str(),
@@ -156,7 +156,7 @@ class PluginRequestHandler : public PluginHelper,
: PluginHelper(plugin), cprequest_(cprequest), user_buffer_(NULL) {
cprequest_->data = this; // see FromCPRequest().
- URLRequestContext* context = CPBrowsingContextManager::Instance()->
+ URLRequestContext* context = CPBrowsingContextManager::GetInstance()->
ToURLRequestContext(cprequest_->context);
// TODO(mpcomplete): remove fallback case when Gears support is prevalent.
if (!context)
@@ -386,7 +386,7 @@ void STDCALL CPB_SetKeepProcessAlive(CPID id, CPBool keep_alive) {
CPError STDCALL CPB_GetCookies(CPID id, CPBrowsingContext bcontext,
const char* url, char** cookies) {
CHECK(ChromePluginLib::IsPluginThread());
- URLRequestContext* context = CPBrowsingContextManager::Instance()->
+ URLRequestContext* context = CPBrowsingContextManager::GetInstance()->
ToURLRequestContext(bcontext);
// TODO(mpcomplete): remove fallback case when Gears support is prevalent.
if (!context) {
diff --git a/chrome/browser/chromeos/gview_request_interceptor.cc b/chrome/browser/chromeos/gview_request_interceptor.cc
index 69f97b2a..f656a8d 100644
--- a/chrome/browser/chromeos/gview_request_interceptor.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor.cc
@@ -81,7 +81,7 @@ net::URLRequestJob* GViewRequestInterceptor::MaybeInterceptResponse(
}
net::URLRequest::Interceptor*
-GViewRequestInterceptor::GetGViewRequestInterceptor() {
+GViewRequestInterceptor::GetInstance() {
return Singleton<GViewRequestInterceptor>::get();
}
diff --git a/chrome/browser/chromeos/gview_request_interceptor.h b/chrome/browser/chromeos/gview_request_interceptor.h
index a8b8250..0a1691b 100644
--- a/chrome/browser/chromeos/gview_request_interceptor.h
+++ b/chrome/browser/chromeos/gview_request_interceptor.h
@@ -32,7 +32,7 @@ class GViewRequestInterceptor : public net::URLRequest::Interceptor {
virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request);
// Singleton accessor.
- static net::URLRequest::Interceptor* GetGViewRequestInterceptor();
+ static net::URLRequest::Interceptor* GetInstance();
private:
friend struct DefaultSingletonTraits<GViewRequestInterceptor>;
diff --git a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
index ac72746..ef66061 100644
--- a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
@@ -51,7 +51,7 @@ class GViewRequestInterceptorTest : public testing::Test {
virtual void SetUp() {
net::URLRequest::RegisterProtocolFactory("http",
&GViewRequestInterceptorTest::Factory);
- interceptor_ = GViewRequestInterceptor::GetGViewRequestInterceptor();
+ interceptor_ = GViewRequestInterceptor::GetInstance();
ASSERT_TRUE(PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path_));
}
diff --git a/chrome/browser/dom_ui/conflicts_ui.cc b/chrome/browser/dom_ui/conflicts_ui.cc
index 8e2bcae..ed51f21 100644
--- a/chrome/browser/dom_ui/conflicts_ui.cc
+++ b/chrome/browser/dom_ui/conflicts_ui.cc
@@ -142,11 +142,11 @@ void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) {
// This request is handled asynchronously. See Observe for when we reply back.
registrar_.Add(this, NotificationType::MODULE_LIST_ENUMERATED,
NotificationService::AllSources());
- EnumerateModulesModel::GetSingleton()->ScanNow();
+ EnumerateModulesModel::GetInstance()->ScanNow();
}
void ConflictsDOMHandler::SendModuleList() {
- EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetSingleton();
+ EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetInstance();
ListValue* list = loaded_modules->GetModuleList();
DictionaryValue results;
results.Set("moduleList", list);
diff --git a/chrome/browser/dom_ui/plugins_ui.cc b/chrome/browser/dom_ui/plugins_ui.cc
index 62564bd..6746fdd 100644
--- a/chrome/browser/dom_ui/plugins_ui.cc
+++ b/chrome/browser/dom_ui/plugins_ui.cc
@@ -214,7 +214,7 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
return;
bool enable = enable_str == "true";
- PluginUpdater* plugin_updater = PluginUpdater::GetPluginUpdater();
+ PluginUpdater* plugin_updater = PluginUpdater::GetInstance();
if (is_group_str == "true") {
string16 group_name;
if (!args->GetString(0, &group_name))
@@ -262,7 +262,7 @@ void PluginsDOMHandler::Observe(NotificationType type,
void PluginsDOMHandler::LoadPluginsOnFileThread(ListWrapper* wrapper,
Task* task) {
- wrapper->list = PluginUpdater::GetPluginUpdater()->GetPluginGroupsData();
+ wrapper->list = PluginUpdater::GetInstance()->GetPluginGroupsData();
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, task);
BrowserThread::PostTask(
BrowserThread::UI,
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc
index b521b6c..24ded4e 100644
--- a/chrome/browser/enumerate_modules_model_win.cc
+++ b/chrome/browser/enumerate_modules_model_win.cc
@@ -672,6 +672,11 @@ string16 ModuleEnumerator::GetSubjectNameFromDigitalSignature(
// ----------------------------------------------------------------------------
+// static
+EnumerateModulesModel* EnumerateModulesModel::GetInstance() {
+ return Singleton<EnumerateModulesModel>::get();
+}
+
void EnumerateModulesModel::ScanNow() {
if (scanning_)
return; // A scan is already in progress.
diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h
index 9000a6c..a4479c4 100644
--- a/chrome/browser/enumerate_modules_model_win.h
+++ b/chrome/browser/enumerate_modules_model_win.h
@@ -218,9 +218,7 @@ class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> {
// notification.
class EnumerateModulesModel {
public:
- static EnumerateModulesModel* GetSingleton() {
- return Singleton<EnumerateModulesModel>::get();
- }
+ static EnumerateModulesModel* GetInstance();
// Returns the number of suspected bad modules found in the last scan.
// Returns 0 if no scan has taken place yet.
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index c67482a..180a5bb 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -75,7 +75,7 @@ void BookmarksFunction::Observe(NotificationType type,
}
// static
-ExtensionBookmarkEventRouter* ExtensionBookmarkEventRouter::GetSingleton() {
+ExtensionBookmarkEventRouter* ExtensionBookmarkEventRouter::GetInstance() {
return Singleton<ExtensionBookmarkEventRouter>::get();
}
diff --git a/chrome/browser/extensions/extension_bookmarks_module.h b/chrome/browser/extensions/extension_bookmarks_module.h
index 10fe373..21b9ad8 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.h
+++ b/chrome/browser/extensions/extension_bookmarks_module.h
@@ -21,7 +21,7 @@
// the extension system.
class ExtensionBookmarkEventRouter : public BookmarkModelObserver {
public:
- static ExtensionBookmarkEventRouter* GetSingleton();
+ static ExtensionBookmarkEventRouter* GetInstance();
virtual ~ExtensionBookmarkEventRouter();
// Call this for each model to observe. Safe to call multiple times per
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index ec4b9d5..9d9654c 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -75,7 +75,7 @@ ExtensionFunction* NewExtensionFunction() {
// create instances of them.
class FactoryRegistry {
public:
- static FactoryRegistry* instance();
+ static FactoryRegistry* GetInstance();
FactoryRegistry() { ResetFunctions(); }
// Resets all functions to their default values.
@@ -102,7 +102,7 @@ class FactoryRegistry {
FactoryMap factories_;
};
-FactoryRegistry* FactoryRegistry::instance() {
+FactoryRegistry* FactoryRegistry::GetInstance() {
return Singleton<FactoryRegistry>::get();
}
@@ -325,16 +325,16 @@ ExtensionFunction* FactoryRegistry::NewFunction(const std::string& name) {
void ExtensionFunctionDispatcher::GetAllFunctionNames(
std::vector<std::string>* names) {
- FactoryRegistry::instance()->GetAllNames(names);
+ FactoryRegistry::GetInstance()->GetAllNames(names);
}
bool ExtensionFunctionDispatcher::OverrideFunction(
const std::string& name, ExtensionFunctionFactory factory) {
- return FactoryRegistry::instance()->OverrideFunction(name, factory);
+ return FactoryRegistry::GetInstance()->OverrideFunction(name, factory);
}
void ExtensionFunctionDispatcher::ResetFunctions() {
- FactoryRegistry::instance()->ResetFunctions();
+ FactoryRegistry::GetInstance()->ResetFunctions();
}
ExtensionFunctionDispatcher* ExtensionFunctionDispatcher::Create(
@@ -444,7 +444,7 @@ Browser* ExtensionFunctionDispatcher::GetCurrentBrowser(
void ExtensionFunctionDispatcher::HandleRequest(
const ViewHostMsg_DomMessage_Params& params) {
scoped_refptr<ExtensionFunction> function(
- FactoryRegistry::instance()->NewFunction(params.name));
+ FactoryRegistry::GetInstance()->NewFunction(params.name));
function->set_dispatcher_peer(peer_);
function->set_profile(profile_);
function->set_extension_id(extension_id());
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index f052573..2d99c88 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -66,7 +66,7 @@ bool ExtensionHost::enable_dom_automation_ = false;
// ExtensionHosts, to avoid blocking the UI.
class ExtensionHost::ProcessCreationQueue {
public:
- static ProcessCreationQueue* get() {
+ static ProcessCreationQueue* GetInstance() {
return Singleton<ProcessCreationQueue>::get();
}
@@ -155,7 +155,7 @@ ExtensionHost::~ExtensionHost() {
NotificationType::EXTENSION_HOST_DESTROYED,
Source<Profile>(profile_),
Details<ExtensionHost>(this));
- ProcessCreationQueue::get()->Remove(this);
+ ProcessCreationQueue::GetInstance()->Remove(this);
render_view_host_->Shutdown(); // deletes render_view_host
}
@@ -197,7 +197,7 @@ void ExtensionHost::CreateRenderViewSoon(RenderWidgetHostView* host_view) {
// to defer.
CreateRenderViewNow();
} else {
- ProcessCreationQueue::get()->CreateSoon(this);
+ ProcessCreationQueue::GetInstance()->CreateSoon(this);
}
}
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 73955fc..e807637 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -612,7 +612,7 @@ void ExtensionsService::InitEventRouters() {
ExtensionHistoryEventRouter::GetInstance()->ObserveProfile(profile_);
ExtensionAccessibilityEventRouter::GetInstance()->ObserveProfile(profile_);
ExtensionBrowserEventRouter::GetInstance()->Init(profile_);
- ExtensionBookmarkEventRouter::GetSingleton()->Observe(
+ ExtensionBookmarkEventRouter::GetInstance()->Observe(
profile_->GetBookmarkModel());
ExtensionCookiesEventRouter::GetInstance()->Init();
ExtensionManagementEventRouter::GetInstance()->Init();
diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc
index b9d1103..8626fde 100644
--- a/chrome/browser/gpu_process_host.cc
+++ b/chrome/browser/gpu_process_host.cc
@@ -52,7 +52,7 @@ class RouteOnUIThreadTask : public Task {
private:
void Run() {
- GpuProcessHostUIShim::Get()->OnMessageReceived(msg_);
+ GpuProcessHostUIShim::GetInstance()->OnMessageReceived(msg_);
}
IPC::Message msg_;
};
diff --git a/chrome/browser/gpu_process_host_ui_shim.cc b/chrome/browser/gpu_process_host_ui_shim.cc
index d8257a8..f864634 100644
--- a/chrome/browser/gpu_process_host_ui_shim.cc
+++ b/chrome/browser/gpu_process_host_ui_shim.cc
@@ -34,7 +34,7 @@ GpuProcessHostUIShim::~GpuProcessHostUIShim() {
}
// static
-GpuProcessHostUIShim* GpuProcessHostUIShim::Get() {
+GpuProcessHostUIShim* GpuProcessHostUIShim::GetInstance() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return Singleton<GpuProcessHostUIShim>::get();
}
diff --git a/chrome/browser/gpu_process_host_ui_shim.h b/chrome/browser/gpu_process_host_ui_shim.h
index eda33d2..8b09067 100644
--- a/chrome/browser/gpu_process_host_ui_shim.h
+++ b/chrome/browser/gpu_process_host_ui_shim.h
@@ -23,7 +23,7 @@ class GpuProcessHostUIShim : public IPC::Channel::Sender,
public NonThreadSafe {
public:
// Getter for the singleton. This will return NULL on failure.
- static GpuProcessHostUIShim* Get();
+ static GpuProcessHostUIShim* GetInstance();
int32 GetNextRoutingId();
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index e21f075..d0a1f01 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -300,10 +300,12 @@ void MetricsLog::RecordEnvironment(
{
OPEN_ELEMENT_FOR_SCOPE("gpu");
- WriteIntAttribute("vendorid",
- GpuProcessHostUIShim::Get()->gpu_info().vendor_id());
- WriteIntAttribute("deviceid",
- GpuProcessHostUIShim::Get()->gpu_info().device_id());
+ WriteIntAttribute(
+ "vendorid",
+ GpuProcessHostUIShim::GetInstance()->gpu_info().vendor_id());
+ WriteIntAttribute(
+ "deviceid",
+ GpuProcessHostUIShim::GetInstance()->gpu_info().device_id());
}
{
diff --git a/chrome/browser/net/metadata_url_request.cc b/chrome/browser/net/metadata_url_request.cc
index 375e664..9d990c5 100644
--- a/chrome/browser/net/metadata_url_request.cc
+++ b/chrome/browser/net/metadata_url_request.cc
@@ -75,7 +75,7 @@ bool MetadataRequestHandler::ReadRawData(net::IOBuffer* buf, int buf_size,
return false;
}
if (!parsed) {
- MetadataParserManager* manager = MetadataParserManager::Get();
+ MetadataParserManager* manager = MetadataParserManager::GetInstance();
scoped_ptr<MetadataParser> parser(manager->GetParserForFile(path));
if (parser != NULL) {
result_ = "{\n";
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc
index 7ceb3fd..cba7dd3 100644
--- a/chrome/browser/page_info_model.cc
+++ b/chrome/browser/page_info_model.cc
@@ -59,7 +59,7 @@ PageInfoModel::PageInfoModel(Profile* profile,
int status_with_warnings_removed = ssl.cert_status() & ~cert_warnings;
if (ssl.cert_id() &&
- CertStore::GetSharedInstance()->RetrieveCert(ssl.cert_id(), &cert) &&
+ CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), &cert) &&
!net::IsCertStatusError(status_with_warnings_removed)) {
// No error found so far, check cert_status warnings.
int cert_status = ssl.cert_status();
diff --git a/chrome/browser/parsers/metadata_parser_manager.cc b/chrome/browser/parsers/metadata_parser_manager.cc
index f428fa3..9d5d12c 100644
--- a/chrome/browser/parsers/metadata_parser_manager.cc
+++ b/chrome/browser/parsers/metadata_parser_manager.cc
@@ -15,12 +15,11 @@
static const int kAmountToRead = 256;
// Gets the singleton
-MetadataParserManager* MetadataParserManager::Get() {
- // Uses the LeakySingletonTrait because cleanup is optional.
- return
- Singleton<MetadataParserManager,
- LeakySingletonTraits<MetadataParserManager> >::get();
- }
+MetadataParserManager* MetadataParserManager::GetInstance() {
+ // Uses the LeakySingletonTrait because cleanup is optional.
+ return Singleton<MetadataParserManager,
+ LeakySingletonTraits<MetadataParserManager> >::get();
+}
bool MetadataParserManager::RegisterParserFactory(
MetadataParserFactory* parser) {
diff --git a/chrome/browser/parsers/metadata_parser_manager.h b/chrome/browser/parsers/metadata_parser_manager.h
index 67d7d51..ed922e3 100644
--- a/chrome/browser/parsers/metadata_parser_manager.h
+++ b/chrome/browser/parsers/metadata_parser_manager.h
@@ -22,7 +22,7 @@ class MetadataParserManager {
~MetadataParserManager();
// Gets the singleton
- static MetadataParserManager* Get();
+ static MetadataParserManager* GetInstance();
// Adds a new Parser to the manager, when requests come in for a parser
// the manager will loop through the list of parsers, and query each.
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index c6ee524..ce10aa0 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -348,7 +348,7 @@ void PluginProcessHost::OpenChannelToPlugin(Client* client) {
void PluginProcessHost::OnGetCookies(uint32 request_context,
const GURL& url,
std::string* cookies) {
- URLRequestContext* context = CPBrowsingContextManager::Instance()->
+ URLRequestContext* context = CPBrowsingContextManager::GetInstance()->
ToURLRequestContext(request_context);
// TODO(mpcomplete): remove fallback case when Gears support is prevalent.
if (!context)
@@ -398,7 +398,8 @@ void PluginProcessHost::OnResolveProxyCompleted(IPC::Message* reply_msg,
URLRequestContext* PluginProcessHost::GetRequestContext(
uint32 request_id,
const ViewHostMsg_Resource_Request& request_data) {
- return CPBrowsingContextManager::Instance()->ToURLRequestContext(request_id);
+ return CPBrowsingContextManager::GetInstance()->ToURLRequestContext(
+ request_id);
}
void PluginProcessHost::RequestPluginChannel(Client* client) {
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index fd52a1c..83c188c 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -65,7 +65,7 @@ void PluginService::InitGlobalInstance(Profile* profile) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// We first group the plugins and then figure out which groups to disable.
- PluginUpdater::GetPluginUpdater()->DisablePluginGroupsFromPrefs(profile);
+ PluginUpdater::GetInstance()->DisablePluginGroupsFromPrefs(profile);
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableOutdatedPlugins)) {
diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc
index 4eff704..63e5bb6 100644
--- a/chrome/browser/plugin_updater.cc
+++ b/chrome/browser/plugin_updater.cc
@@ -292,14 +292,14 @@ void PluginUpdater::NotifyPluginStatusChanged() {
}
void PluginUpdater::OnNotifyPluginStatusChanged() {
- GetPluginUpdater()->notify_pending_ = false;
+ GetInstance()->notify_pending_ = false;
NotificationService::current()->Notify(
NotificationType::PLUGIN_ENABLE_STATUS_CHANGED,
- Source<PluginUpdater>(GetPluginUpdater()),
+ Source<PluginUpdater>(GetInstance()),
NotificationService::NoDetails());
}
/*static*/
-PluginUpdater* PluginUpdater::GetPluginUpdater() {
+PluginUpdater* PluginUpdater::GetInstance() {
return Singleton<PluginUpdater>::get();
}
diff --git a/chrome/browser/plugin_updater.h b/chrome/browser/plugin_updater.h
index ecdd1d5..5264334 100644
--- a/chrome/browser/plugin_updater.h
+++ b/chrome/browser/plugin_updater.h
@@ -45,7 +45,7 @@ class PluginUpdater : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
- static PluginUpdater* GetPluginUpdater();
+ static PluginUpdater* GetInstance();
private:
PluginUpdater();
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
index b40119a..cafad5a 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
@@ -141,7 +141,7 @@ void CloudPrintProxyService::OnDialogClosed() {
void CloudPrintProxyService::RefreshCloudPrintProxyStatus() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ServiceProcessControl* process_control =
- ServiceProcessControlManager::instance()->GetProcessControl(profile_);
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(profile_);
DCHECK(process_control->is_connected());
Callback2<bool, std::string>::Type* callback =
NewCallback(this, &CloudPrintProxyService::StatusCallback);
@@ -152,7 +152,7 @@ void CloudPrintProxyService::RefreshCloudPrintProxyStatus() {
void CloudPrintProxyService::EnableCloudPrintProxy(const std::string& lsid,
const std::string& email) {
ServiceProcessControl* process_control =
- ServiceProcessControlManager::instance()->GetProcessControl(profile_);
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(profile_);
DCHECK(process_control->is_connected());
process_control->Send(new ServiceMsg_EnableCloudPrintProxy(lsid));
// Assume the IPC worked.
@@ -161,7 +161,7 @@ void CloudPrintProxyService::EnableCloudPrintProxy(const std::string& lsid,
void CloudPrintProxyService::DisableCloudPrintProxy() {
ServiceProcessControl* process_control =
- ServiceProcessControlManager::instance()->GetProcessControl(profile_);
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(profile_);
DCHECK(process_control->is_connected());
process_control->Send(new ServiceMsg_DisableCloudPrintProxy);
// Assume the IPC worked.
@@ -175,7 +175,7 @@ void CloudPrintProxyService::StatusCallback(bool enabled, std::string email) {
bool CloudPrintProxyService::InvokeServiceTask(Task* task) {
ServiceProcessControl* process_control =
- ServiceProcessControlManager::instance()->GetProcessControl(profile_);
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(profile_);
DCHECK(process_control);
if (process_control)
process_control->Launch(task, NULL);
diff --git a/chrome/browser/remoting/remoting_setup_flow.cc b/chrome/browser/remoting/remoting_setup_flow.cc
index a517be3..6255c50 100644
--- a/chrome/browser/remoting/remoting_setup_flow.cc
+++ b/chrome/browser/remoting/remoting_setup_flow.cc
@@ -209,7 +209,7 @@ void RemotingSetupFlow::OnIssueAuthTokenSuccess(const std::string& service,
// If we have already connected to the service process then submit the tokens
// to it to register the host.
process_control_ =
- ServiceProcessControlManager::instance()->GetProcessControl(profile_);
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(profile_);
if (process_control_->is_connected()) {
// TODO(hclam): Need to figure out what to do when the service process is
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 5af2e6f..7e85058 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -940,7 +940,8 @@ void BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
void BrowserRenderProcessHost::OnChannelConnected(int32 peer_pid) {
#if defined(IPC_MESSAGE_LOG_ENABLED)
- Send(new ViewMsg_SetIPCLoggingEnabled(IPC::Logging::current()->Enabled()));
+ Send(new ViewMsg_SetIPCLoggingEnabled(
+ IPC::Logging::GetInstance()->Enabled()));
#endif
}
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 4e6ecab..9a4953e 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -1161,8 +1161,8 @@ bool ResourceDispatcherHost::CompleteResponseStarted(net::URLRequest* request) {
if (request->ssl_info().cert) {
int cert_id =
- CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert,
- info->child_id());
+ CertStore::GetInstance()->StoreCert(request->ssl_info().cert,
+ info->child_id());
response->response_head.security_info =
SSLManager::SerializeSecurityInfo(
cert_id, request->ssl_info().cert_status,
@@ -1500,7 +1500,7 @@ void ResourceDispatcherHost::OnResponseCompleted(net::URLRequest* request) {
std::string security_info;
const net::SSLInfo& ssl_info = request->ssl_info();
if (ssl_info.cert != NULL) {
- int cert_id = CertStore::GetSharedInstance()->StoreCert(ssl_info.cert,
+ int cert_id = CertStore::GetInstance()->StoreCert(ssl_info.cert,
info->child_id());
security_info = SSLManager::SerializeSecurityInfo(
cert_id, ssl_info.cert_status, ssl_info.security_bits,
@@ -1595,8 +1595,8 @@ net::URLRequest* ResourceDispatcherHost::GetURLRequest(
static int GetCertID(net::URLRequest* request, int child_id) {
if (request->ssl_info().cert) {
- return CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert,
- child_id);
+ return CertStore::GetInstance()->StoreCert(request->ssl_info().cert,
+ child_id);
}
// If there is no SSL info attached to this request, we must either be a non
// secure request, or the request has been canceled or failed (before the SSL
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index d356f78..a745d91f 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -1094,7 +1094,7 @@ void ResourceMessageFilter::OnCheckNotificationPermission(
void ResourceMessageFilter::OnGetCPBrowsingContext(uint32* context) {
// Always allocate a new context when a plugin requests one, since it needs to
// be unique for that plugin instance.
- *context = CPBrowsingContextManager::Instance()->Allocate(
+ *context = CPBrowsingContextManager::GetInstance()->Allocate(
request_context_->GetURLRequestContext());
}
diff --git a/chrome/browser/service/service_process_control_browsertest.cc b/chrome/browser/service/service_process_control_browsertest.cc
index ca47f9e..8cf596c 100644
--- a/chrome/browser/service/service_process_control_browsertest.cc
+++ b/chrome/browser/service/service_process_control_browsertest.cc
@@ -23,13 +23,13 @@ class ServiceProcessControlBrowserTest
base::CloseProcessHandle(service_process_handle_);
service_process_handle_ = base::kNullProcessHandle;
// Delete all instances of ServiceProcessControl.
- ServiceProcessControlManager::instance()->Shutdown();
+ ServiceProcessControlManager::GetInstance()->Shutdown();
}
protected:
void LaunchServiceProcessControl() {
ServiceProcessControl* process =
- ServiceProcessControlManager::instance()->GetProcessControl(
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(
browser()->profile());
process_ = process;
@@ -55,7 +55,7 @@ class ServiceProcessControlBrowserTest
void Disconnect() {
// This will delete all instances of ServiceProcessControl and close the IPC
// connections.
- ServiceProcessControlManager::instance()->Shutdown();
+ ServiceProcessControlManager::GetInstance()->Shutdown();
process_ = NULL;
}
@@ -140,7 +140,7 @@ static void DecrementUntilZero(int* count) {
// get invoked.
IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, MultipleLaunchTasks) {
ServiceProcessControl* process =
- ServiceProcessControlManager::instance()->GetProcessControl(
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(
browser()->profile());
int launch_count = 5;
for (int i = 0; i < launch_count; i++) {
@@ -159,7 +159,7 @@ IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, MultipleLaunchTasks) {
// Make sure using the same task for success and failure tasks works.
IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, SameLaunchTask) {
ServiceProcessControl* process =
- ServiceProcessControlManager::instance()->GetProcessControl(
+ ServiceProcessControlManager::GetInstance()->GetProcessControl(
browser()->profile());
int launch_count = 5;
for (int i = 0; i < launch_count; i++) {
diff --git a/chrome/browser/service/service_process_control_manager.cc b/chrome/browser/service/service_process_control_manager.cc
index bf2dd77..cb405fe 100644
--- a/chrome/browser/service/service_process_control_manager.cc
+++ b/chrome/browser/service/service_process_control_manager.cc
@@ -42,6 +42,6 @@ void ServiceProcessControlManager::Shutdown() {
}
// static
-ServiceProcessControlManager* ServiceProcessControlManager::instance() {
+ServiceProcessControlManager* ServiceProcessControlManager::GetInstance() {
return Singleton<ServiceProcessControlManager>::get();
}
diff --git a/chrome/browser/service/service_process_control_manager.h b/chrome/browser/service/service_process_control_manager.h
index a57c43e..a27ec03 100644
--- a/chrome/browser/service/service_process_control_manager.h
+++ b/chrome/browser/service/service_process_control_manager.h
@@ -32,7 +32,7 @@ class ServiceProcessControlManager {
void Shutdown();
// Return the instance of ServiceProcessControlManager.
- static ServiceProcessControlManager* instance();
+ static ServiceProcessControlManager* GetInstance();
private:
ServiceProcessControlList process_control_list_;
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 45bca07..b2bf6a1 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -103,7 +103,7 @@ std::string SSLBlockingPage::GetHTMLContents() {
void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
const net::SSLInfo& ssl_info = handler_->ssl_info();
- int cert_id = CertStore::GetSharedInstance()->StoreCert(
+ int cert_id = CertStore::GetInstance()->StoreCert(
ssl_info.cert, tab()->render_view_host()->process()->id());
entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN);
diff --git a/chrome/browser/ssl/ssl_error_info.cc b/chrome/browser/ssl/ssl_error_info.cc
index 674a64b..b10e212 100644
--- a/chrome/browser/ssl/ssl_error_info.cc
+++ b/chrome/browser/ssl/ssl_error_info.cc
@@ -253,7 +253,7 @@ int SSLErrorInfo::GetErrorsForCertStatus(int cert_id,
if (cert_status & kErrorFlags[i]) {
count++;
if (!cert.get()) {
- bool r = CertStore::GetSharedInstance()->RetrieveCert(cert_id, &cert);
+ bool r = CertStore::GetInstance()->RetrieveCert(cert_id, &cert);
DCHECK(r);
}
if (errors)
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 8249ecb0d..8c3f4ea 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -432,7 +432,7 @@ bool BrowserInit::LaunchBrowser(const CommandLine& command_line,
// of compatible documents (PDF, etc) to the GView document viewer.
const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
if (parsed_command_line.HasSwitch(switches::kEnableGView)) {
- chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor();
+ chromeos::GViewRequestInterceptor::GetInstance();
}
if (process_startup) {
// TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile
diff --git a/chrome/browser/ui/cocoa/about_ipc_controller.mm b/chrome/browser/ui/cocoa/about_ipc_controller.mm
index df6ae24..f7f7c31 100644
--- a/chrome/browser/ui/cocoa/about_ipc_controller.mm
+++ b/chrome/browser/ui/cocoa/about_ipc_controller.mm
@@ -102,7 +102,7 @@ AboutIPCController* gSharedController = nil;
gSharedController = nil;
if (g_browser_process)
g_browser_process->SetIPCLoggingEnabled(false); // just in case...
- IPC::Logging::current()->SetConsumer(NULL);
+ IPC::Logging::GetInstance()->SetConsumer(NULL);
[super dealloc];
}
@@ -113,7 +113,7 @@ AboutIPCController* gSharedController = nil;
// We are now able to display information, so let'er rip.
bridge_.reset(new AboutIPCBridge(self));
- IPC::Logging::current()->SetConsumer(bridge_.get());
+ IPC::Logging::GetInstance()->SetConsumer(bridge_.get());
}
// Delegate callback. Closing the window means there is no more need
@@ -123,14 +123,15 @@ AboutIPCController* gSharedController = nil;
}
- (void)updateVisibleRunState {
- if (IPC::Logging::current()->Enabled())
+ if (IPC::Logging::GetInstance()->Enabled())
[startStopButton_ setTitle:@"Stop"];
else
[startStopButton_ setTitle:@"Start"];
}
- (IBAction)startStop:(id)sender {
- g_browser_process->SetIPCLoggingEnabled(!IPC::Logging::current()->Enabled());
+ g_browser_process->SetIPCLoggingEnabled(
+ !IPC::Logging::GetInstance()->Enabled());
[self updateVisibleRunState];
}
diff --git a/chrome/browser/ui/cocoa/page_info_bubble_controller.mm b/chrome/browser/ui/cocoa/page_info_bubble_controller.mm
index 1e3bc94..e0a13f6 100644
--- a/chrome/browser/ui/cocoa/page_info_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/page_info_bubble_controller.mm
@@ -376,7 +376,7 @@ void ShowPageInfoBubble(gfx::NativeWindow parent,
// By default, assume that we don't have certificate information to show.
scoped_refptr<net::X509Certificate> cert;
- CertStore::GetSharedInstance()->RetrieveCert(certID_, &cert);
+ CertStore::GetInstance()->RetrieveCert(certID_, &cert);
// Don't bother showing certificates if there isn't one. Gears runs
// with no OS root certificate.
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc
index 024c272..5a6a97c 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc
@@ -88,7 +88,7 @@ ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const {
return SECURITY_WARNING;
}
if ((ssl.cert_status() & net::CERT_STATUS_IS_EV) &&
- CertStore::GetSharedInstance()->RetrieveCert(ssl.cert_id(), NULL))
+ CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), NULL))
return EV_SECURE;
return SECURE;
@@ -115,7 +115,7 @@ std::wstring ToolbarModel::GetEVCertName() const {
scoped_refptr<net::X509Certificate> cert;
// Note: Navigation controller and active entry are guaranteed non-NULL or
// the security level would be NONE.
- CertStore::GetSharedInstance()->RetrieveCert(
+ CertStore::GetInstance()->RetrieveCert(
GetNavigationController()->GetActiveEntry()->ssl().cert_id(), &cert);
return SSLManager::GetEVCertName(*cert);
}
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 7eb2309..0efd669 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -62,7 +62,7 @@ const float kMenuBadgeFontSize = 12.0;
namespace {
SkBitmap GetBackgroundPageIcon() {
string16 pages = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
return badge_util::DrawBadgeIconOverlay(
*ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_BACKGROUND_MENU),
kMenuBadgeFontSize,
@@ -261,7 +261,7 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
#endif
case IDC_VIEW_BACKGROUND_PAGES: {
string16 num_background_pages = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES,
num_background_pages);
}
@@ -306,13 +306,13 @@ bool WrenchMenuModel::IsCommandIdVisible(int command_id) const {
} else if (command_id == IDC_VIEW_INCOMPATIBILITIES) {
#if defined(OS_WIN)
EnumerateModulesModel* loaded_modules =
- EnumerateModulesModel::GetSingleton();
+ EnumerateModulesModel::GetInstance();
return loaded_modules->confirmed_bad_modules_detected() > 0;
#else
return false;
#endif
} else if (command_id == IDC_VIEW_BACKGROUND_PAGES) {
- BackgroundPageTracker* tracker = BackgroundPageTracker::GetSingleton();
+ BackgroundPageTracker* tracker = BackgroundPageTracker::GetInstance();
return tracker->GetBackgroundPageCount() > 0;
}
return true;
@@ -351,7 +351,7 @@ void WrenchMenuModel::Observe(NotificationType type,
const NotificationDetails& details) {
switch (type.value) {
case NotificationType::BACKGROUND_PAGE_TRACKER_CHANGED: {
- int num_pages = BackgroundPageTracker::GetSingleton()->
+ int num_pages = BackgroundPageTracker::GetInstance()->
GetUnacknowledgedBackgroundPageCount();
if (num_pages > 0) {
SetIcon(GetIndexOfCommandId(IDC_VIEW_BACKGROUND_PAGES),
@@ -466,7 +466,7 @@ void WrenchMenuModel::Build() {
IDS_ABOUT, product_name));
}
string16 num_background_pages = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
AddItem(IDC_VIEW_BACKGROUND_PAGES, l10n_util::GetStringFUTF16(
IDS_VIEW_BACKGROUND_PAGES, num_background_pages));
AddItem(IDC_UPGRADE_DIALOG, l10n_util::GetStringFUTF16(
@@ -484,7 +484,7 @@ void WrenchMenuModel::Build() {
// Add an icon to the View Background Pages item if there are unacknowledged
// pages.
- if (BackgroundPageTracker::GetSingleton()->
+ if (BackgroundPageTracker::GetInstance()->
GetUnacknowledgedBackgroundPageCount() > 0) {
SetIcon(GetIndexOfCommandId(IDC_VIEW_BACKGROUND_PAGES),
GetBackgroundPageIcon());
diff --git a/chrome/browser/ui/views/about_ipc_dialog.cc b/chrome/browser/ui/views/about_ipc_dialog.cc
index b61f83c..3e5d5d6 100644
--- a/chrome/browser/ui/views/about_ipc_dialog.cc
+++ b/chrome/browser/ui/views/about_ipc_dialog.cc
@@ -203,12 +203,12 @@ AboutIPCDialog::AboutIPCDialog()
table_(NULL),
tracking_(false) {
SetupControls();
- IPC::Logging::current()->SetConsumer(this);
+ IPC::Logging::GetInstance()->SetConsumer(this);
}
AboutIPCDialog::~AboutIPCDialog() {
active_dialog = NULL;
- IPC::Logging::current()->SetConsumer(NULL);
+ IPC::Logging::GetInstance()->SetConsumer(NULL);
}
// static
diff --git a/chrome/browser/ui/views/accessible_pane_view.cc b/chrome/browser/ui/views/accessible_pane_view.cc
index fa8a478..1e07d1d 100644
--- a/chrome/browser/ui/views/accessible_pane_view.cc
+++ b/chrome/browser/ui/views/accessible_pane_view.cc
@@ -107,7 +107,7 @@ void AccessiblePaneView::LocationBarSelectAll() {
}
void AccessiblePaneView::RestoreLastFocusedView() {
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
views::View* last_focused_view =
view_storage->RetrieveView(last_focused_view_storage_id_);
if (last_focused_view) {
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 4cbd7e2..b970b16 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -425,7 +425,7 @@ void BrowserView::SetShowState(int state) {
BrowserView::BrowserView(Browser* browser)
: views::ClientView(NULL, NULL),
last_focused_view_storage_id_(
- views::ViewStorage::GetSharedInstance()->CreateStorageID()),
+ views::ViewStorage::GetInstance()->CreateStorageID()),
frame_(NULL),
browser_(browser),
active_bookmark_bar_(NULL),
@@ -983,7 +983,7 @@ void BrowserView::RotatePaneFocus(bool forwards) {
}
void BrowserView::SaveFocusedView() {
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
if (view_storage->RetrieveView(last_focused_view_storage_id_))
view_storage->RemoveView(last_focused_view_storage_id_);
views::View* focused_view = GetRootView()->GetFocusedView();
diff --git a/chrome/browser/ui/views/html_dialog_view_browsertest.cc b/chrome/browser/ui/views/html_dialog_view_browsertest.cc
index baacb95..e79712b 100644
--- a/chrome/browser/ui/views/html_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/html_dialog_view_browsertest.cc
@@ -73,7 +73,7 @@ class HtmlDialogBrowserTest : public InProcessBrowserTest {
public:
WindowChangedObserver() {}
- static WindowChangedObserver* Get() {
+ static WindowChangedObserver* GetInstance() {
return Singleton<WindowChangedObserver>::get();
}
@@ -95,7 +95,7 @@ class HtmlDialogBrowserTest : public InProcessBrowserTest {
public:
WindowChangedObserver() {}
- static WindowChangedObserver* Get() {
+ static WindowChangedObserver* GetInstance() {
return Singleton<WindowChangedObserver>::get();
}
@@ -136,7 +136,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
html_view->InitDialog();
html_view->window()->Show();
- MessageLoopForUI::current()->AddObserver(WindowChangedObserver::Get());
+ MessageLoopForUI::current()->AddObserver(
+ WindowChangedObserver::GetInstance());
gfx::Rect bounds;
html_view->GetWidget()->GetBounds(&bounds, false);
@@ -202,5 +203,6 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
EXPECT_LT(0, actual_bounds.width());
EXPECT_LT(0, actual_bounds.height());
- MessageLoopForUI::current()->RemoveObserver(WindowChangedObserver::Get());
+ MessageLoopForUI::current()->RemoveObserver(
+ WindowChangedObserver::GetInstance());
}
diff --git a/chrome/browser/ui/views/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info_bubble_view.cc
index 0dbd950..073c6f7 100644
--- a/chrome/browser/ui/views/page_info_bubble_view.cc
+++ b/chrome/browser/ui/views/page_info_bubble_view.cc
@@ -96,7 +96,7 @@ PageInfoBubbleView::PageInfoBubbleView(gfx::NativeWindow parent_window,
animation_start_height_(0) {
if (cert_id_ > 0) {
scoped_refptr<net::X509Certificate> cert;
- CertStore::GetSharedInstance()->RetrieveCert(cert_id_, &cert);
+ CertStore::GetInstance()->RetrieveCert(cert_id_, &cert);
// When running with fake certificate (Chrome Frame) or Gears in offline
// mode, we have no os certificate, so there is no cert to show. Don't
// bother showing the cert info link in that case.
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
index d090259..c911c4d 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
@@ -106,7 +106,7 @@ TabContentsViewGtk::TabContentsViewGtk(TabContents* tab_contents)
ignore_next_char_event_(false) {
drag_source_.reset(new TabContentsDragSource(this));
last_focused_view_storage_id_ =
- views::ViewStorage::GetSharedInstance()->CreateStorageID();
+ views::ViewStorage::GetInstance()->CreateStorageID();
}
TabContentsViewGtk::~TabContentsViewGtk() {
@@ -114,7 +114,7 @@ TabContentsViewGtk::~TabContentsViewGtk() {
//
// It is possible the view went away before us, so we only do this if the
// view is registered.
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
if (view_storage->RetrieveView(last_focused_view_storage_id_) != NULL)
view_storage->RemoveView(last_focused_view_storage_id_);
@@ -277,7 +277,7 @@ void TabContentsViewGtk::SetInitialFocus() {
}
void TabContentsViewGtk::StoreFocus() {
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
if (view_storage->RetrieveView(last_focused_view_storage_id_) != NULL)
view_storage->RemoveView(last_focused_view_storage_id_);
@@ -294,7 +294,7 @@ void TabContentsViewGtk::StoreFocus() {
}
void TabContentsViewGtk::RestoreFocus() {
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
views::View* last_focused_view =
view_storage->RetrieveView(last_focused_view_storage_id_);
if (!last_focused_view) {
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
index 4aec5c2..164fd92 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
@@ -41,7 +41,7 @@ TabContentsViewWin::TabContentsViewWin(TabContents* tab_contents)
close_tab_after_drag_ends_(false),
sad_tab_(NULL) {
last_focused_view_storage_id_ =
- views::ViewStorage::GetSharedInstance()->CreateStorageID();
+ views::ViewStorage::GetInstance()->CreateStorageID();
}
TabContentsViewWin::~TabContentsViewWin() {
@@ -49,7 +49,7 @@ TabContentsViewWin::~TabContentsViewWin() {
//
// It is possible the view went away before us, so we only do this if the
// view is registered.
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
if (view_storage->RetrieveView(last_focused_view_storage_id_) != NULL)
view_storage->RemoveView(last_focused_view_storage_id_);
}
@@ -213,7 +213,7 @@ void TabContentsViewWin::SetInitialFocus() {
}
void TabContentsViewWin::StoreFocus() {
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
if (view_storage->RetrieveView(last_focused_view_storage_id_) != NULL)
view_storage->RemoveView(last_focused_view_storage_id_);
@@ -243,7 +243,7 @@ void TabContentsViewWin::StoreFocus() {
}
void TabContentsViewWin::RestoreFocus() {
- views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
views::View* last_focused_view =
view_storage->RetrieveView(last_focused_view_storage_id_);
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 73a4be3..7044ec2 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -355,7 +355,7 @@ cleanup:
destroyed_flag_ = NULL;
// Stop showing the background app badge also.
- BackgroundPageTracker::GetSingleton()->AcknowledgeBackgroundPages();
+ BackgroundPageTracker::GetInstance()->AcknowledgeBackgroundPages();
}
////////////////////////////////////////////////////////////////////////////////
@@ -633,13 +633,13 @@ bool ToolbarView::IsUpgradeRecommended() {
}
bool ToolbarView::ShouldShowBackgroundPageBadge() {
- return BackgroundPageTracker::GetSingleton()->
+ return BackgroundPageTracker::GetInstance()->
GetUnacknowledgedBackgroundPageCount() > 0;
}
bool ToolbarView::ShouldShowIncompatibilityWarning() {
#if defined(OS_WIN)
- EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetSingleton();
+ EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetInstance();
return loaded_modules->confirmed_bad_modules_detected() > 0;
#else
return false;
@@ -761,7 +761,7 @@ SkBitmap ToolbarView::GetBackgroundPageBadge() {
ThemeProvider* tp = GetThemeProvider();
SkBitmap* badge = tp->GetBitmapNamed(IDR_BACKGROUND_BADGE);
string16 badge_text = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
return badge_util::DrawBadgeIconOverlay(
*badge,
kBadgeTextFontSize,
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc
index b001eff..dad6415 100644
--- a/chrome/common/child_process_host.cc
+++ b/chrome/common/child_process_host.cc
@@ -111,7 +111,7 @@ bool ChildProcessHost::CreateChannel() {
// Make sure these messages get sent first.
#if defined(IPC_MESSAGE_LOG_ENABLED)
- bool enabled = IPC::Logging::current()->Enabled();
+ bool enabled = IPC::Logging::GetInstance()->Enabled();
SendOnChannel(new PluginProcessMsg_SetIPCLoggingEnabled(enabled));
#endif
@@ -149,7 +149,7 @@ ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host)
void ChildProcessHost::ListenerHook::OnMessageReceived(
const IPC::Message& msg) {
#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging* logger = IPC::Logging::current();
+ IPC::Logging* logger = IPC::Logging::GetInstance();
if (msg.type() == IPC_LOGGING_ID) {
logger->OnReceivedLoggingMessage(msg);
return;
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
index 848f1e18..2a46de8 100644
--- a/chrome/common/child_thread.cc
+++ b/chrome/common/child_thread.cc
@@ -47,7 +47,7 @@ void ChildThread::Init() {
ChildProcess::current()->io_message_loop(), true,
ChildProcess::current()->GetShutDownEvent()));
#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging::current()->SetIPCSender(this);
+ IPC::Logging::GetInstance()->SetIPCSender(this);
#endif
resource_dispatcher_.reset(new ResourceDispatcher(this));
@@ -66,7 +66,7 @@ void ChildThread::Init() {
ChildThread::~ChildThread() {
#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging::current()->SetIPCSender(NULL);
+ IPC::Logging::GetInstance()->SetIPCSender(NULL);
#endif
channel_->RemoveFilter(sync_message_filter_.get());
@@ -180,9 +180,9 @@ void ChildThread::OnShutdown() {
#if defined(IPC_MESSAGE_LOG_ENABLED)
void ChildThread::OnSetIPCLoggingEnabled(bool enable) {
if (enable)
- IPC::Logging::current()->Enable();
+ IPC::Logging::GetInstance()->Enable();
else
- IPC::Logging::current()->Disable();
+ IPC::Logging::GetInstance()->Disable();
}
#endif // IPC_MESSAGE_LOG_ENABLED
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 530c0be..687d3f4 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -133,7 +133,7 @@ const size_t kNumNonPermissionFunctionNames =
// A singleton object containing global data needed by the extension objects.
class ExtensionConfig {
public:
- static ExtensionConfig* GetSingleton() {
+ static ExtensionConfig* GetInstance() {
return Singleton<ExtensionConfig>::get();
}
@@ -288,7 +288,7 @@ GURL Extension::GalleryUpdateUrl(bool secure) {
// static
int Extension::GetPermissionMessageId(const std::string& permission) {
- return ExtensionConfig::GetSingleton()->GetPermissionMessageId(permission);
+ return ExtensionConfig::GetInstance()->GetPermissionMessageId(permission);
}
std::vector<string16> Extension::GetPermissionMessages() const {
@@ -1975,7 +1975,7 @@ static std::string SizeToString(const gfx::Size& max_size) {
void Extension::SetScriptingWhitelist(
const std::vector<std::string>& whitelist) {
ScriptingWhitelist* current_whitelist =
- ExtensionConfig::GetSingleton()->whitelist();
+ ExtensionConfig::GetInstance()->whitelist();
current_whitelist->clear();
for (ScriptingWhitelist::const_iterator it = whitelist.begin();
it != whitelist.end(); ++it) {
@@ -2221,7 +2221,7 @@ bool Extension::CanExecuteScriptEverywhere() const {
return true;
ScriptingWhitelist* whitelist =
- ExtensionConfig::GetSingleton()->whitelist();
+ ExtensionConfig::GetInstance()->whitelist();
for (ScriptingWhitelist::const_iterator it = whitelist->begin();
it != whitelist->end(); ++it) {
diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc
index 260c5a4..71ae5d7 100644
--- a/chrome/service/service_ipc_server.cc
+++ b/chrome/service/service_ipc_server.cc
@@ -15,7 +15,7 @@ ServiceIPCServer::ServiceIPCServer(const std::string& channel_name)
bool ServiceIPCServer::Init() {
#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging::current()->SetIPCSender(this);
+ IPC::Logging::GetInstance()->SetIPCSender(this);
#endif
sync_message_filter_ =
new IPC::SyncMessageFilter(g_service_process->shutdown_event());
@@ -34,7 +34,7 @@ void ServiceIPCServer::CreateChannel() {
ServiceIPCServer::~ServiceIPCServer() {
#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging::current()->SetIPCSender(NULL);
+ IPC::Logging::GetInstance()->SetIPCSender(NULL);
#endif
channel_->RemoveFilter(sync_message_filter_.get());
diff --git a/chrome/test/gpu/gpu_pixel_browsertest.cc b/chrome/test/gpu/gpu_pixel_browsertest.cc
index decf0c4..e5c2238 100644
--- a/chrome/test/gpu/gpu_pixel_browsertest.cc
+++ b/chrome/test/gpu/gpu_pixel_browsertest.cc
@@ -156,7 +156,7 @@ class GpuPixelBrowserTest : public InProcessBrowserTest {
#error "Not implemented for this platform"
#endif
if (using_gpu_) {
- const GPUInfo& info = GpuProcessHostUIShim::Get()->gpu_info();
+ const GPUInfo& info = GpuProcessHostUIShim::GetInstance()->gpu_info();
if (info.progress() != GPUInfo::kComplete) {
LOG(ERROR) << "Could not get gpu info";
return false;
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc
index 7d3f5eb..286f351 100644
--- a/chrome_frame/chrome_frame_activex.cc
+++ b/chrome_frame/chrome_frame_activex.cc
@@ -37,7 +37,7 @@ class TopLevelWindowMapping {
public:
typedef std::vector<HWND> WindowList;
- static TopLevelWindowMapping* instance() {
+ static TopLevelWindowMapping* GetInstance() {
return Singleton<TopLevelWindowMapping>::get();
}
@@ -83,7 +83,7 @@ LRESULT CALLBACK TopWindowProc(int code, WPARAM wparam, LPARAM lparam) {
case WM_MOVE:
case WM_MOVING: {
TopLevelWindowMapping::WindowList cf_instances =
- TopLevelWindowMapping::instance()->GetInstances(message_hwnd);
+ TopLevelWindowMapping::GetInstance()->GetInstances(message_hwnd);
TopLevelWindowMapping::WindowList::iterator
iter(cf_instances.begin()), end(cf_instances.end());
for (;iter != end; ++iter) {
@@ -646,7 +646,7 @@ HRESULT ChromeFrameActivex::InstallTopLevelHook(IOleClientSite* client_site) {
HWND top_window = ::GetAncestor(parent_wnd, GA_ROOT);
chrome_wndproc_hook_ = InstallLocalWindowHook(top_window);
if (chrome_wndproc_hook_)
- TopLevelWindowMapping::instance()->AddMapping(top_window, m_hWnd);
+ TopLevelWindowMapping::GetInstance()->AddMapping(top_window, m_hWnd);
return chrome_wndproc_hook_ ? S_OK : E_FAIL;
}
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index c7dd5cf..811c314 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -253,7 +253,7 @@ END_MSG_MAP()
void SetResourceModule() {
DCHECK(NULL == prev_resource_instance_);
- SimpleResourceLoader* loader_instance = SimpleResourceLoader::instance();
+ SimpleResourceLoader* loader_instance = SimpleResourceLoader::GetInstance();
DCHECK(loader_instance);
HMODULE res_dll = loader_instance->GetResourceModuleHandle();
_AtlBaseModule.SetResourceInstance(res_dll);
diff --git a/chrome_frame/simple_resource_loader.cc b/chrome_frame/simple_resource_loader.cc
index 324c5ca..ce6407b 100644
--- a/chrome_frame/simple_resource_loader.cc
+++ b/chrome_frame/simple_resource_loader.cc
@@ -116,7 +116,7 @@ SimpleResourceLoader::~SimpleResourceLoader() {
}
// static
-SimpleResourceLoader* SimpleResourceLoader::instance() {
+SimpleResourceLoader* SimpleResourceLoader::GetInstance() {
return Singleton<SimpleResourceLoader>::get();
}
@@ -240,12 +240,12 @@ std::wstring SimpleResourceLoader::GetLocalizedResource(int message_id) {
// static
std::wstring SimpleResourceLoader::GetLanguage() {
- return SimpleResourceLoader::instance()->language_;
+ return SimpleResourceLoader::GetInstance()->language_;
}
// static
std::wstring SimpleResourceLoader::Get(int message_id) {
- SimpleResourceLoader* loader = SimpleResourceLoader::instance();
+ SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance();
return loader->GetLocalizedResource(message_id);
}
diff --git a/chrome_frame/simple_resource_loader.h b/chrome_frame/simple_resource_loader.h
index 45d03ed..505c0cb 100644
--- a/chrome_frame/simple_resource_loader.h
+++ b/chrome_frame/simple_resource_loader.h
@@ -21,7 +21,7 @@
class SimpleResourceLoader {
public:
- static SimpleResourceLoader* instance();
+ static SimpleResourceLoader* GetInstance();
// Returns the language tag for the active language.
static std::wstring GetLanguage();
diff --git a/chrome_frame/test/simple_resource_loader_test.cc b/chrome_frame/test/simple_resource_loader_test.cc
index 9b67a6e..98729f3 100644
--- a/chrome_frame/test/simple_resource_loader_test.cc
+++ b/chrome_frame/test/simple_resource_loader_test.cc
@@ -57,7 +57,7 @@ TEST(SimpleResourceLoaderTest, LoadLocaleDll) {
}
TEST(SimpleResourceLoaderTest, InstanceTest) {
- SimpleResourceLoader* loader = SimpleResourceLoader::instance();
+ SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance();
ASSERT_TRUE(NULL != loader);
ASSERT_TRUE(NULL != loader->GetResourceModuleHandle());
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 9d0b81a..0d0160b 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -939,7 +939,7 @@ bool Channel::ChannelImpl::Send(Message* message) {
<< " (" << output_queue_.size() << " in queue)";
#ifdef IPC_MESSAGE_LOG_ENABLED
- Logging::current()->OnSendMessage(message, "");
+ Logging::GetInstance()->OnSendMessage(message, "");
#endif
output_queue_.push(message);
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index fd5144c..aba6bf5e 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -78,7 +78,7 @@ void ChannelProxy::Context::CreateChannel(const IPC::ChannelHandle& handle,
bool ChannelProxy::Context::TryFilters(const Message& message) {
#ifdef IPC_MESSAGE_LOG_ENABLED
- Logging* logger = Logging::current();
+ Logging* logger = Logging::GetInstance();
if (logger->Enabled())
logger->OnPreDispatchMessage(message);
#endif
@@ -240,7 +240,7 @@ void ChannelProxy::Context::OnDispatchMessage(const Message& message) {
OnDispatchConnected();
#ifdef IPC_MESSAGE_LOG_ENABLED
- Logging* logger = Logging::current();
+ Logging* logger = Logging::GetInstance();
if (message.type() == IPC_LOGGING_ID) {
logger->OnReceivedLoggingMessage(message);
return;
@@ -340,7 +340,7 @@ void ChannelProxy::Close() {
bool ChannelProxy::Send(Message* message) {
#ifdef IPC_MESSAGE_LOG_ENABLED
- Logging::current()->OnSendMessage(message, context_->channel_id());
+ Logging::GetInstance()->OnSendMessage(message, context_->channel_id());
#endif
context_->ipc_message_loop()->PostTask(FROM_HERE,
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index 28a880d..e12c521 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -152,7 +152,7 @@ bool Channel::ChannelImpl::Send(Message* message) {
<< " (" << output_queue_.size() << " in queue)";
#ifdef IPC_MESSAGE_LOG_ENABLED
- Logging::current()->OnSendMessage(message, "");
+ Logging::GetInstance()->OnSendMessage(message, "");
#endif
output_queue_.push(message);
diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc
index 3b26cdc..2abbf0a 100644
--- a/ipc/ipc_logging.cc
+++ b/ipc/ipc_logging.cc
@@ -66,7 +66,7 @@ Logging::Logging()
Logging::~Logging() {
}
-Logging* Logging::current() {
+Logging* Logging::GetInstance() {
return Singleton<Logging>::get();
}
diff --git a/ipc/ipc_logging.h b/ipc/ipc_logging.h
index ee2f62b..56c8d1c 100644
--- a/ipc/ipc_logging.h
+++ b/ipc/ipc_logging.h
@@ -46,7 +46,7 @@ class Logging {
void SetConsumer(Consumer* consumer);
~Logging();
- static Logging* current();
+ static Logging* GetInstance();
// Enable and Disable are NOT cross-process; they only affect the
// current thread/process. If you want to modify the value for all
diff --git a/net/base/registry_controlled_domain.h b/net/base/registry_controlled_domain.h
index fc64f3a..7586c12 100644
--- a/net/base/registry_controlled_domain.h
+++ b/net/base/registry_controlled_domain.h
@@ -198,6 +198,11 @@ class RegistryControlledDomainService {
static size_t GetRegistryLength(const std::wstring& host,
bool allow_unknown_registries);
+ // Returns the singleton instance, after attempting to initialize it.
+ // NOTE that if the effective-TLD data resource can't be found, the instance
+ // will be initialized and continue operation with simple default TLD data.
+ static RegistryControlledDomainService* GetInstance();
+
protected:
// The entire protected API is only for unit testing. I mean it. Don't make
// me come over there!
@@ -221,11 +226,6 @@ class RegistryControlledDomainService {
// To allow construction of the internal singleton instance.
friend struct DefaultSingletonTraits<RegistryControlledDomainService>;
- // Returns the singleton instance, after attempting to initialize it.
- // NOTE that if the effective-TLD data resource can't be found, the instance
- // will be initialized and continue operation with simple default TLD data.
- static RegistryControlledDomainService* GetInstance();
-
// Internal workings of the static public methods. See above.
static std::string GetDomainAndRegistryImpl(const std::string& host);
size_t GetRegistryLengthImpl(const std::string& host,
diff --git a/views/focus/external_focus_tracker.cc b/views/focus/external_focus_tracker.cc
index b08d287..0787359 100644
--- a/views/focus/external_focus_tracker.cc
+++ b/views/focus/external_focus_tracker.cc
@@ -16,7 +16,7 @@ ExternalFocusTracker::ExternalFocusTracker(View* parent_view,
parent_view_(parent_view) {
DCHECK(focus_manager);
DCHECK(parent_view);
- view_storage_ = ViewStorage::GetSharedInstance();
+ view_storage_ = ViewStorage::GetInstance();
last_focused_view_storage_id_ = view_storage_->CreateStorageID();
// Store the view which is focused when we're created.
StartTracking();
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc
index 4848e4b..5e869ad 100644
--- a/views/focus/focus_manager.cc
+++ b/views/focus/focus_manager.cc
@@ -71,7 +71,7 @@ FocusManager::FocusManager(Widget* widget)
focus_change_reason_(kReasonDirectFocusChange) {
DCHECK(widget_);
stored_focused_view_storage_id_ =
- ViewStorage::GetSharedInstance()->CreateStorageID();
+ ViewStorage::GetInstance()->CreateStorageID();
}
FocusManager::~FocusManager() {
@@ -332,7 +332,7 @@ void FocusManager::ClearFocus() {
}
void FocusManager::StoreFocusedView() {
- ViewStorage* view_storage = ViewStorage::GetSharedInstance();
+ ViewStorage* view_storage = ViewStorage::GetInstance();
if (!view_storage) {
// This should never happen but bug 981648 seems to indicate it could.
NOTREACHED();
@@ -365,7 +365,7 @@ void FocusManager::StoreFocusedView() {
}
void FocusManager::RestoreFocusedView() {
- ViewStorage* view_storage = ViewStorage::GetSharedInstance();
+ ViewStorage* view_storage = ViewStorage::GetInstance();
if (!view_storage) {
// This should never happen but bug 981648 seems to indicate it could.
NOTREACHED();
@@ -399,7 +399,7 @@ void FocusManager::RestoreFocusedView() {
}
void FocusManager::ClearStoredFocusedView() {
- ViewStorage* view_storage = ViewStorage::GetSharedInstance();
+ ViewStorage* view_storage = ViewStorage::GetInstance();
if (!view_storage) {
// This should never happen but bug 981648 seems to indicate it could.
NOTREACHED();
diff --git a/views/focus/view_storage.cc b/views/focus/view_storage.cc
index 9b8b9ee..1852044 100644
--- a/views/focus/view_storage.cc
+++ b/views/focus/view_storage.cc
@@ -12,7 +12,7 @@
namespace views {
// static
-ViewStorage* ViewStorage::GetSharedInstance() {
+ViewStorage* ViewStorage::GetInstance() {
return Singleton<ViewStorage>::get();
}
diff --git a/views/focus/view_storage.h b/views/focus/view_storage.h
index bc34bb2..892989a 100644
--- a/views/focus/view_storage.h
+++ b/views/focus/view_storage.h
@@ -24,7 +24,7 @@ class ViewStorage {
public:
// Returns the global ViewStorage instance.
// It is guaranted to be non NULL.
- static ViewStorage* GetSharedInstance();
+ static ViewStorage* GetInstance();
// Returns a unique storage id that can be used to store/retrieve views.
int CreateStorageID();
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 886f1f2..fe5effe 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -616,7 +616,7 @@ TEST_F(ViewTest, DISABLED_Painting) {
*/
TEST_F(ViewTest, RemoveNotification) {
- views::ViewStorage* vs = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* vs = views::ViewStorage::GetInstance();
views::Widget* window = CreateWidget();
views::RootView* root_view = window->GetRootView();
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index 92f6cf7..b7c424b 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -296,7 +296,7 @@ void RootView::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
if (focus_manager)
focus_manager->ViewRemoved(parent, child);
- ViewStorage::GetSharedInstance()->ViewRemoved(parent, child);
+ ViewStorage::GetInstance()->ViewRemoved(parent, child);
}
}
diff --git a/webkit/appcache/appcache_interceptor.cc b/webkit/appcache/appcache_interceptor.cc
index 969b513..1c76df4 100644
--- a/webkit/appcache/appcache_interceptor.cc
+++ b/webkit/appcache/appcache_interceptor.cc
@@ -13,15 +13,20 @@
namespace appcache {
+// static
+AppCacheInterceptor* AppCacheInterceptor::GetInstance() {
+ return Singleton<AppCacheInterceptor>::get();
+}
+
void AppCacheInterceptor::SetHandler(
net::URLRequest* request, AppCacheRequestHandler* handler) {
- request->SetUserData(instance(), handler); // request takes ownership
+ request->SetUserData(GetInstance(), handler); // request takes ownership
}
AppCacheRequestHandler* AppCacheInterceptor::GetHandler(
net::URLRequest* request) {
return reinterpret_cast<AppCacheRequestHandler*>(
- request->GetUserData(instance()));
+ request->GetUserData(GetInstance()));
}
void AppCacheInterceptor::SetExtraRequestInfo(
diff --git a/webkit/appcache/appcache_interceptor.h b/webkit/appcache/appcache_interceptor.h
index 5a7acfd..a13dcc6 100644
--- a/webkit/appcache/appcache_interceptor.h
+++ b/webkit/appcache/appcache_interceptor.h
@@ -22,7 +22,7 @@ class AppCacheInterceptor : public net::URLRequest::Interceptor {
// Registers a singleton instance with the net library.
// Should be called early in the IO thread prior to initiating requests.
static void EnsureRegistered() {
- CHECK(instance());
+ CHECK(GetInstance());
}
// Must be called to make a request eligible for retrieval from an appcache.
@@ -38,6 +38,8 @@ class AppCacheInterceptor : public net::URLRequest::Interceptor {
int64* cache_id,
GURL* manifest_url);
+ static AppCacheInterceptor* GetInstance();
+
protected:
// Overridde from net::URLRequest::Interceptor:
virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request);
@@ -48,10 +50,6 @@ class AppCacheInterceptor : public net::URLRequest::Interceptor {
private:
friend struct DefaultSingletonTraits<AppCacheInterceptor>;
- static AppCacheInterceptor* instance() {
- return Singleton<AppCacheInterceptor>::get();
- }
-
AppCacheInterceptor();
virtual ~AppCacheInterceptor();
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 12d5702..42e1d1d8 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -61,7 +61,7 @@ namespace {
class MemoryUsageCache {
public:
// Retrieves the Singleton.
- static MemoryUsageCache* Get() {
+ static MemoryUsageCache* GetInstance() {
return Singleton<MemoryUsageCache>::get();
}
@@ -499,7 +499,7 @@ static size_t memoryUsageMBGeneric() {
static size_t getMemoryUsageMB(bool bypass_cache) {
size_t current_mem_usage = 0;
- MemoryUsageCache* mem_usage_cache_singleton = MemoryUsageCache::Get();
+ MemoryUsageCache* mem_usage_cache_singleton = MemoryUsageCache::GetInstance();
if (!bypass_cache &&
mem_usage_cache_singleton->IsCachedValueValid(&current_mem_usage))
return current_mem_usage;