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

Side by Side Diff: chrome/browser/chromeos/events/event_rewriter.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/events/event_rewriter.h" 5 #include "chrome/browser/chromeos/events/event_rewriter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/sticky_keys/sticky_keys_controller.h" 9 #include "ash/sticky_keys/sticky_keys_controller.h"
10 #include "ash/wm/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 key_event.type() == ui::ET_KEY_RELEASED); 549 key_event.type() == ui::ET_KEY_RELEASED);
550 550
551 // Do nothing if we have just logged in as guest but have not restarted chrome 551 // Do nothing if we have just logged in as guest but have not restarted chrome
552 // process yet (so we are still on the login screen). In this situations we 552 // process yet (so we are still on the login screen). In this situations we
553 // have no user profile so can not do anything useful. 553 // have no user profile so can not do anything useful.
554 // Note that currently, unlike other accounts, when user logs in as guest, we 554 // Note that currently, unlike other accounts, when user logs in as guest, we
555 // restart chrome process. In future this is to be changed. 555 // restart chrome process. In future this is to be changed.
556 // TODO(glotov): remove the following condition when we do not restart chrome 556 // TODO(glotov): remove the following condition when we do not restart chrome
557 // when user logs in as guest. 557 // when user logs in as guest.
558 // TODO(kpschoedel): check whether this is still necessary. 558 // TODO(kpschoedel): check whether this is still necessary.
559 if (UserManager::Get()->IsLoggedInAsGuest() && 559 if (GetUserManager()->IsLoggedInAsGuest() &&
560 LoginDisplayHostImpl::default_host()) 560 LoginDisplayHostImpl::default_host())
561 return; 561 return;
562 562
563 const PrefService* pref_service = GetPrefService(); 563 const PrefService* pref_service = GetPrefService();
564 if (!pref_service) 564 if (!pref_service)
565 return; 565 return;
566 566
567 MutableKeyState incoming = *state; 567 MutableKeyState incoming = *state;
568 state->flags = ui::EF_NONE; 568 state->flags = ui::EF_NONE;
569 int characteristic_flag = ui::EF_NONE; 569 int characteristic_flag = ui::EF_NONE;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 933
934 XIFreeDeviceInfo(device_info); 934 XIFreeDeviceInfo(device_info);
935 } 935 }
936 936
937 void EventRewriter::DeviceRemoved(int device_id) { 937 void EventRewriter::DeviceRemoved(int device_id) {
938 device_id_to_type_.erase(device_id); 938 device_id_to_type_.erase(device_id);
939 } 939 }
940 #endif 940 #endif
941 941
942 } // namespace chromeos 942 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698