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

Side by Side Diff: chrome/browser/chromeos/power/screen_lock_observer.cc

Issue 10911261: chromeos: Stop calling ProfileManager::GetDefaultProfile() from extension event dispatch functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added function comments Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/power/screen_lock_observer.h" 5 #include "chrome/browser/chromeos/power/screen_lock_observer.h"
6 6
7 #include "chrome/browser/extensions/system/system_api.h" 7 #include "chrome/browser/extensions/system/system_api.h"
8 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 ScreenLockObserver::ScreenLockObserver() { 12 ScreenLockObserver::ScreenLockObserver(Profile* profile)
13 : profile_(profile) {
13 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); 14 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
14 } 15 }
15 16
16 ScreenLockObserver::~ScreenLockObserver() { 17 ScreenLockObserver::~ScreenLockObserver() {
17 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); 18 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
18 } 19 }
19 20
20 void ScreenLockObserver::UnlockScreen() { 21 void ScreenLockObserver::UnlockScreen() {
21 extensions::DispatchScreenUnlockedEvent(); 22 extensions::DispatchScreenUnlockedEvent(profile_);
22 } 23 }
23 24
24 } // namespace chromeos 25 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698