| Index: chrome/browser/chromeos/status/caps_lock_menu_button.cc
|
| diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button.cc b/chrome/browser/chromeos/status/caps_lock_menu_button.cc
|
| index 7dc5e3e29e65891640ab340724b08ee325bcb4ac..48ac562328654219762ccb22f3c1ead2521d6d6e 100644
|
| --- a/chrome/browser/chromeos/status/caps_lock_menu_button.cc
|
| +++ b/chrome/browser/chromeos/status/caps_lock_menu_button.cc
|
| @@ -9,8 +9,9 @@
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/chromeos/input_method/xkeyboard.h"
|
| #include "chrome/browser/chromeos/system/runtime_environment.h"
|
| +#include "chrome/browser/chromeos/view_ids.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| -#include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/ui/views/bubble/bubble.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -41,10 +42,10 @@ const int kTextPadX = 10;
|
| const size_t kMaxBubbleCount = 3;
|
| const size_t kCloseBubbleTimerInSec = 5;
|
|
|
| -// Returns PrefService object associated with |host|.
|
| -PrefService* GetPrefService(chromeos::StatusAreaHost* host) {
|
| - if (host->GetProfile())
|
| - return host->GetProfile()->GetPrefs();
|
| +PrefService* GetPrefService() {
|
| + Profile* profile = ProfileManager::GetDefaultProfile();
|
| + if (profile)
|
| + return profile->GetPrefs();
|
| return NULL;
|
| }
|
|
|
| @@ -145,13 +146,14 @@ class CapsLockMenuButton::StatusView : public View {
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // CapsLockMenuButton
|
|
|
| -CapsLockMenuButton::CapsLockMenuButton(StatusAreaHost* host)
|
| - : StatusAreaButton(host, this),
|
| - prefs_(GetPrefService(host)),
|
| +CapsLockMenuButton::CapsLockMenuButton(StatusAreaButton::Delegate* delegate)
|
| + : StatusAreaButton(delegate, this),
|
| + prefs_(GetPrefService()),
|
| status_(NULL),
|
| bubble_(NULL),
|
| should_show_bubble_(true),
|
| bubble_count_(0) {
|
| + set_id(VIEW_ID_STATUS_BUTTON_CAPS_LOCK);
|
| if (prefs_)
|
| remap_search_key_to_.Init(
|
| prefs::kLanguageXkbRemapSearchKeyTo, prefs_, this);
|
|
|