diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-29 05:25:51 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-29 05:25:51 +0000 |
commit | 089e30358bb6378ddd6b1edaa64c1049c4c21392 (patch) | |
tree | ab3f383cdaf00bb0248f723e456c2882bfb33cec /chrome | |
parent | ae458e05ccadde5fcedb1c24373c827ab6ed94a5 (diff) | |
download | chromium_src-089e30358bb6378ddd6b1edaa64c1049c4c21392.zip chromium_src-089e30358bb6378ddd6b1edaa64c1049c4c21392.tar.gz chromium_src-089e30358bb6378ddd6b1edaa64c1049c4c21392.tar.bz2 |
chromeos: Rename functions to be PascalCase.
As they are now virtual.
BUG=chromium-os:22197
TEST=chrome and tests build
Review URL: http://codereview.chromium.org/8400077
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
19 files changed, 52 insertions, 50 deletions
diff --git a/chrome/browser/chromeos/accessibility_util.cc b/chrome/browser/chromeos/accessibility_util.cc index f461e40..22d13e3 100644 --- a/chrome/browser/chromeos/accessibility_util.cc +++ b/chrome/browser/chromeos/accessibility_util.cc @@ -157,10 +157,10 @@ void Speak(const char* speak_str, bool queue, bool interruptible) { props.append(queue ? "1;" : "0;"); props.append("interruptible="); props.append(interruptible ? "1;" : "0;"); - chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> + chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()-> SetSpeakProperties(props); } - chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> + chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()-> Speak(speak_str); } diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc index 58c2376..ca9402f 100644 --- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc +++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc @@ -19,7 +19,8 @@ class BluetoothAdapterImpl : public BluetoothAdapter, explicit BluetoothAdapterImpl(const std::string& id) : id_(id) { DBusThreadManager* dbus_thread_manager = DBusThreadManager::Get(); DCHECK(dbus_thread_manager); - bluetooth_adapter_client_ = dbus_thread_manager->bluetooth_adapter_client(); + bluetooth_adapter_client_ = + dbus_thread_manager->GetBluetoothAdapterClient(); DCHECK(bluetooth_adapter_client_); bluetooth_adapter_client_->AddObserver(this, id_); } diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_manager.cc b/chrome/browser/chromeos/bluetooth/bluetooth_manager.cc index 31339a9..3161885 100644 --- a/chrome/browser/chromeos/bluetooth/bluetooth_manager.cc +++ b/chrome/browser/chromeos/bluetooth/bluetooth_manager.cc @@ -21,7 +21,8 @@ class BluetoothManagerImpl : public BluetoothManager, BluetoothManagerImpl() : weak_ptr_factory_(this) { DBusThreadManager* dbus_thread_manager = DBusThreadManager::Get(); DCHECK(dbus_thread_manager); - bluetooth_manager_client_ = dbus_thread_manager->bluetooth_manager_client(); + bluetooth_manager_client_ = + dbus_thread_manager->GetBluetoothManagerClient(); DCHECK(bluetooth_manager_client_); bluetooth_manager_client_->AddObserver(this); diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index 8a43b31..cb897b0 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc @@ -81,12 +81,12 @@ ChromeBrowserMainPartsChromeos::~ChromeBrowserMainPartsChromeos() { // We should remove observers attached to D-Bus clients before // DBusThreadManager is shut down. if (session_manager_observer_.get()) { - chromeos::DBusThreadManager::Get()->session_manager_client()-> + chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> RemoveObserver(session_manager_observer_.get()); } if (brightness_observer_.get()) { - chromeos::DBusThreadManager::Get()->power_manager_client()->RemoveObserver( - brightness_observer_.get()); + chromeos::DBusThreadManager::Get()->GetPowerManagerClient() + ->RemoveObserver(brightness_observer_.get()); } chromeos::DBusThreadManager::Shutdown(); @@ -146,12 +146,12 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { // Initialize the brightness observer so that we'll display an onscreen // indication of brightness changes during login. brightness_observer_.reset(new chromeos::BrightnessObserver()); - chromeos::DBusThreadManager::Get()->power_manager_client()->AddObserver( + chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( brightness_observer_.get()); // Initialize the session manager observer so that we'll take actions // per signals sent from the session manager. session_manager_observer_.reset(new chromeos::SessionManagerObserver); - chromeos::DBusThreadManager::Get()->session_manager_client()-> + chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> AddObserver(session_manager_observer_.get()); // Initialize the Chrome OS bluetooth subsystem diff --git a/chrome/browser/chromeos/dbus/dbus_thread_manager.cc b/chrome/browser/chromeos/dbus/dbus_thread_manager.cc index 9d360f5..4a40ca5 100644 --- a/chrome/browser/chromeos/dbus/dbus_thread_manager.cc +++ b/chrome/browser/chromeos/dbus/dbus_thread_manager.cc @@ -75,32 +75,32 @@ class DBusThreadManagerImpl : public DBusThreadManager { } // DBusThreadManager override. - virtual BluetoothAdapterClient* bluetooth_adapter_client() OVERRIDE { + virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE { return bluetooth_adapter_client_.get(); } // DBusThreadManager override. - virtual BluetoothManagerClient* bluetooth_manager_client() OVERRIDE { + virtual BluetoothManagerClient* GetBluetoothManagerClient() OVERRIDE { return bluetooth_manager_client_.get(); } // DBusThreadManager override. - virtual PowerManagerClient* power_manager_client() OVERRIDE { + virtual PowerManagerClient* GetPowerManagerClient() OVERRIDE { return power_manager_client_.get(); } // DBusThreadManager override. - virtual SensorsClient* sensors_client() OVERRIDE { + virtual SensorsClient* GetSensorsClient() OVERRIDE { return sensors_client_.get(); } // DBusThreadManager override. - virtual SessionManagerClient* session_manager_client() OVERRIDE { + virtual SessionManagerClient* GetSessionManagerClient() OVERRIDE { return session_manager_client_.get(); } // DBusThreadManager override. - virtual SpeechSynthesizerClient* speech_synthesizer_client() OVERRIDE { + virtual SpeechSynthesizerClient* GetSpeechSynthesizerClient() OVERRIDE { return speech_synthesizer_client_.get(); } diff --git a/chrome/browser/chromeos/dbus/dbus_thread_manager.h b/chrome/browser/chromeos/dbus/dbus_thread_manager.h index fdac529..df9c35f 100644 --- a/chrome/browser/chromeos/dbus/dbus_thread_manager.h +++ b/chrome/browser/chromeos/dbus/dbus_thread_manager.h @@ -70,31 +70,31 @@ class DBusThreadManager { // Returns the bluetooth adapter client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual BluetoothAdapterClient* bluetooth_adapter_client() = 0; + virtual BluetoothAdapterClient* GetBluetoothAdapterClient() = 0; // Returns the bluetooth manager client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual BluetoothManagerClient* bluetooth_manager_client() = 0; + virtual BluetoothManagerClient* GetBluetoothManagerClient() = 0; // Returns the power manager client, owned by DBusThreadManager. // See also comments at session_manager_client(). - virtual PowerManagerClient* power_manager_client() = 0; + virtual PowerManagerClient* GetPowerManagerClient() = 0; // Returns the session manager client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual SensorsClient* sensors_client() = 0; + virtual SensorsClient* GetSensorsClient() = 0; // Returns the session manager client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual SessionManagerClient* session_manager_client() = 0; + virtual SessionManagerClient* GetSessionManagerClient() = 0; // Returns the speech synthesizer client, owned by DBusThreadManager. // Do not cache this pointer and use it after DBusThreadManager is shut // down. - virtual SpeechSynthesizerClient* speech_synthesizer_client() = 0; + virtual SpeechSynthesizerClient* GetSpeechSynthesizerClient() = 0; virtual ~DBusThreadManager(); diff --git a/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc b/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc index aee4a24..53f8384 100644 --- a/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc +++ b/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc @@ -22,17 +22,17 @@ MockDBusThreadManager::MockDBusThreadManager() mock_sensors_client_(new MockSensorsClient), mock_session_manager_client_(new MockSessionManagerClient), mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient) { - EXPECT_CALL(*this, bluetooth_adapter_client()) + EXPECT_CALL(*this, GetBluetoothAdapterClient()) .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get())); - EXPECT_CALL(*this, bluetooth_manager_client()) + EXPECT_CALL(*this, GetBluetoothManagerClient()) .WillRepeatedly(Return(mock_bluetooth_manager_client())); - EXPECT_CALL(*this, power_manager_client()) + EXPECT_CALL(*this, GetPowerManagerClient()) .WillRepeatedly(Return(mock_power_manager_client_.get())); - EXPECT_CALL(*this, sensors_client()) + EXPECT_CALL(*this, GetSensorsClient()) .WillRepeatedly(Return(mock_sensors_client_.get())); - EXPECT_CALL(*this, session_manager_client()) + EXPECT_CALL(*this, GetSessionManagerClient()) .WillRepeatedly(Return(mock_session_manager_client_.get())); - EXPECT_CALL(*this, speech_synthesizer_client()) + EXPECT_CALL(*this, GetSpeechSynthesizerClient()) .WillRepeatedly(Return(mock_speech_synthesizer_client_.get())); } diff --git a/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h b/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h index 91f1ef4..7f23787 100644 --- a/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h +++ b/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h @@ -27,12 +27,12 @@ class MockDBusThreadManager : public DBusThreadManager { MockDBusThreadManager(); virtual ~MockDBusThreadManager(); - MOCK_METHOD0(bluetooth_adapter_client, BluetoothAdapterClient*(void)); - MOCK_METHOD0(bluetooth_manager_client, BluetoothManagerClient*(void)); - MOCK_METHOD0(power_manager_client, PowerManagerClient*(void)); - MOCK_METHOD0(sensors_client, SensorsClient*(void)); - MOCK_METHOD0(session_manager_client, SessionManagerClient*(void)); - MOCK_METHOD0(speech_synthesizer_client, SpeechSynthesizerClient*(void)); + MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void)); + MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void)); + MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void)); + MOCK_METHOD0(GetSensorsClient, SensorsClient*(void)); + MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void)); + MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void)); MockBluetoothAdapterClient* mock_bluetooth_adapter_client() { return mock_bluetooth_adapter_client_.get(); diff --git a/chrome/browser/chromeos/enterprise_extension_observer.cc b/chrome/browser/chromeos/enterprise_extension_observer.cc index c380ca6..8086952 100644 --- a/chrome/browser/chromeos/enterprise_extension_observer.cc +++ b/chrome/browser/chromeos/enterprise_extension_observer.cc @@ -60,7 +60,7 @@ void EnterpriseExtensionObserver::CheckExtensionAndNotifyEntd( // static void EnterpriseExtensionObserver::NotifyEntd() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - DBusThreadManager::Get()->session_manager_client()->RestartEntd(); + DBusThreadManager::Get()->GetSessionManagerClient()->RestartEntd(); } } // namespace chromeos diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc index 52ddd95..db8a4ce 100644 --- a/chrome/browser/chromeos/login/base_login_display_host.cc +++ b/chrome/browser/chromeos/login/base_login_display_host.cc @@ -351,7 +351,7 @@ void ShowLoginWizard(const std::string& first_screen_name, display_host->StartWizard(first_screen_name, GURL()); chromeos::LoginUtils::Get()->PrewarmAuthentication(); - chromeos::DBusThreadManager::Get()->session_manager_client() + chromeos::DBusThreadManager::Get()->GetSessionManagerClient() ->EmitLoginPromptReady(); // Set initial timezone if specified by customization. diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index f28213f..94c724b 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -115,7 +115,7 @@ void ExistingUserController::Init(const UserVector& users) { login_display_->Init(filtered_users, show_guest, show_new_user); LoginUtils::Get()->PrewarmAuthentication(); - DBusThreadManager::Get()->session_manager_client()->EmitLoginPromptReady(); + DBusThreadManager::Get()->GetSessionManagerClient()->EmitLoginPromptReady(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 0b4a2ad..512189b 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -385,7 +385,7 @@ class JobRestartRequest private: void RestartJob() { if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { - DBusThreadManager::Get()->session_manager_client()->RestartJob( + DBusThreadManager::Get()->GetSessionManagerClient()->RestartJob( pid_, command_line_); } else { // This function can be called on FILE thread. See PostTask in the @@ -578,7 +578,7 @@ void LoginUtilsImpl::PrepareProfile( if (CrosLibrary::Get()->EnsureLoaded()) { btl->AddLoginTimeMarker("StartSession-Start", false); - DBusThreadManager::Get()->session_manager_client()->StartSession( + DBusThreadManager::Get()->GetSessionManagerClient()->StartSession( username); btl->AddLoginTimeMarker("StartSession-End", false); } diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc index f492a87..ca7ee8f 100644 --- a/chrome/browser/chromeos/login/screen_locker.cc +++ b/chrome/browser/chromeos/login/screen_locker.cc @@ -318,7 +318,7 @@ void ScreenLocker::Signout() { #if defined(TOOLKIT_USES_GTK) WmIpc::instance()->NotifyAboutSignout(); #endif - DBusThreadManager::Get()->session_manager_client()->StopSession(); + DBusThreadManager::Get()->GetSessionManagerClient()->StopSession(); // Don't hide yet the locker because the chrome screen may become visible // briefly. diff --git a/chrome/browser/chromeos/login/signed_settings.cc b/chrome/browser/chromeos/login/signed_settings.cc index 27c6794..8011b35 100644 --- a/chrome/browser/chromeos/login/signed_settings.cc +++ b/chrome/browser/chromeos/login/signed_settings.cc @@ -845,7 +845,7 @@ void StorePolicyOp::OnKeyOpComplete(const OwnerManager::KeyOpCode return_code, void StorePolicyOp::RequestStorePolicy() { std::string serialized; if (policy_->SerializeToString(&serialized)) { - DBusThreadManager::Get()->session_manager_client()->StorePolicy( + DBusThreadManager::Get()->GetSessionManagerClient()->StorePolicy( serialized, base::Bind(&StorePolicyOp::OnBoolComplete, this)); } else { @@ -866,7 +866,7 @@ RetrievePolicyOp::RetrievePolicyOp( RetrievePolicyOp::~RetrievePolicyOp() {} void RetrievePolicyOp::Execute() { - DBusThreadManager::Get()->session_manager_client()->RetrievePolicy( + DBusThreadManager::Get()->GetSessionManagerClient()->RetrievePolicy( base::Bind(&RetrievePolicyOp::OnStringComplete, this)); } diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc index a1faf0b..f61d95f 100644 --- a/chrome/browser/chromeos/login/webui_login_view.cc +++ b/chrome/browser/chromeos/login/webui_login_view.cc @@ -321,7 +321,7 @@ void WebUILoginView::OnTabMainFrameFirstRender() { emit_login_visible = true; #endif if (emit_login_visible) - chromeos::DBusThreadManager::Get()->session_manager_client() + chromeos::DBusThreadManager::Get()->GetSessionManagerClient() ->EmitLoginPromptVisible(); OobeUI* oobe_ui = static_cast<OobeUI*>(GetWebUI()); diff --git a/chrome/browser/chromeos/system_key_event_listener.cc b/chrome/browser/chromeos/system_key_event_listener.cc index 0ee46b5..2965f4c 100644 --- a/chrome/browser/chromeos/system_key_event_listener.cc +++ b/chrome/browser/chromeos/system_key_event_listener.cc @@ -197,12 +197,12 @@ void SystemKeyEventListener::GrabKey(int32 key, uint32 mask) { } void SystemKeyEventListener::OnBrightnessDown() { - DBusThreadManager::Get()->power_manager_client()-> + DBusThreadManager::Get()->GetPowerManagerClient()-> DecreaseScreenBrightness(true); } void SystemKeyEventListener::OnBrightnessUp() { - DBusThreadManager::Get()->power_manager_client()-> + DBusThreadManager::Get()->GetPowerManagerClient()-> IncreaseScreenBrightness(); } diff --git a/chrome/browser/extensions/extension_tts_api_chromeos.cc b/chrome/browser/extensions/extension_tts_api_chromeos.cc index b35d460..3ee5d62 100644 --- a/chrome/browser/extensions/extension_tts_api_chromeos.cc +++ b/chrome/browser/extensions/extension_tts_api_chromeos.cc @@ -105,7 +105,7 @@ bool ExtensionTtsPlatformImplChromeOs::Speak( } chromeos::SpeechSynthesizerClient* speech_synthesizer_client = - chromeos::DBusThreadManager::Get()->speech_synthesizer_client(); + chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient(); if (!options.empty()) speech_synthesizer_client->SetSpeakProperties(options); @@ -119,7 +119,7 @@ bool ExtensionTtsPlatformImplChromeOs::Speak( } bool ExtensionTtsPlatformImplChromeOs::StopSpeaking() { - chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> + chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()-> StopSpeaking(); return true; } @@ -137,7 +137,7 @@ void ExtensionTtsPlatformImplChromeOs::PollUntilSpeechFinishes( return; } chromeos::SpeechSynthesizerClient* speech_synthesizer_client = - chromeos::DBusThreadManager::Get()->speech_synthesizer_client(); + chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient(); speech_synthesizer_client->IsSpeaking(base::Bind( &ExtensionTtsPlatformImplChromeOs::ContinuePollingIfSpeechIsNotFinished, weak_ptr_factory_.GetWeakPtr(), utterance_id)); diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc index 8e5a0de..ae67787 100644 --- a/chrome/browser/ui/browser_list.cc +++ b/chrome/browser/ui/browser_list.cc @@ -325,7 +325,7 @@ void BrowserList::NotifyAndTerminate(bool fast_path) { chromeos::UPDATE_STATUS_UPDATED_NEED_REBOOT) { cros_library->GetUpdateLibrary()->RebootAfterUpdate(); } else { - chromeos::DBusThreadManager::Get()->session_manager_client() + chromeos::DBusThreadManager::Get()->GetSessionManagerClient() ->StopSession(); } return; diff --git a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc index 9b60089..18d282d8 100644 --- a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc @@ -154,12 +154,12 @@ void SystemOptionsHandler::DecreaseScreenBrightnessCallback( const ListValue* args) { // Do not allow the options button to turn off the backlight, as that // can make it very difficult to see the increase brightness button. - chromeos::DBusThreadManager::Get()->power_manager_client()-> + chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> DecreaseScreenBrightness(false); } void SystemOptionsHandler::IncreaseScreenBrightnessCallback( const ListValue* args) { - chromeos::DBusThreadManager::Get()->power_manager_client()-> + chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> IncreaseScreenBrightness(); } |