Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9124)

Unified Diff: chrome/browser/chromeos/status/input_method_menu_button.cc

Issue 9651023: Get the ProfileService object after NOTIFICATION_SESSION_STARTED is sent to Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/status/input_method_menu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/input_method_menu_button.cc
diff --git a/chrome/browser/chromeos/status/input_method_menu_button.cc b/chrome/browser/chromeos/status/input_method_menu_button.cc
index b161600530015964017803d422a11753b5ec01f2..b5da306fce3a88d25c16860b8d9f66c1fc5fa9c4 100644
--- a/chrome/browser/chromeos/status/input_method_menu_button.cc
+++ b/chrome/browser/chromeos/status/input_method_menu_button.cc
@@ -10,8 +10,6 @@
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
@@ -19,20 +17,12 @@
namespace {
-PrefService* GetPrefService() {
- Profile* profile = ProfileManager::GetDefaultProfile();
- if (profile)
- return profile->GetPrefs();
- return NULL;
-}
-
// A class which implements interfaces of chromeos::InputMethodMenu. This class
// is just for avoiding multiple inheritance.
class MenuImpl : public chromeos::InputMethodMenu {
public:
- MenuImpl(chromeos::InputMethodMenuButton* button,
- PrefService* pref_service)
- : InputMethodMenu(pref_service, false), button_(button) {}
+ explicit MenuImpl(chromeos::InputMethodMenuButton* button)
+ : button_(button) {}
private:
// InputMethodMenu implementation.
@@ -64,7 +54,7 @@ namespace chromeos {
InputMethodMenuButton::InputMethodMenuButton(
StatusAreaButton::Delegate* delegate)
: StatusAreaButton(delegate, this),
- menu_(new MenuImpl(this, GetPrefService())) {
+ menu_(new MenuImpl(this)) {
set_id(VIEW_ID_STATUS_BUTTON_INPUT_METHOD);
UpdateUIFromCurrentInputMethod();
}
« no previous file with comments | « chrome/browser/chromeos/status/input_method_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698