OLD | NEW |
1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium OS 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 #ifndef LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_ | 5 #ifndef LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_ |
6 #define LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_ | 6 #define LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_ |
7 | 7 |
8 #include <dbus/dbus.h> | 8 #include <dbus/dbus.h> |
9 #include <errno.h> | 9 #include <errno.h> |
10 #include <glib.h> | 10 #include <glib.h> |
11 #include <gtest/gtest.h> | 11 #include <gtest/gtest.h> |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 // So that we can enqueue an event that will exit the main loop. | 373 // So that we can enqueue an event that will exit the main loop. |
374 // |data| is a SessionManagerService* | 374 // |data| is a SessionManagerService* |
375 static gboolean ServiceShutdown(gpointer data); | 375 static gboolean ServiceShutdown(gpointer data); |
376 | 376 |
377 // Initializes |error| with |code| and |message|. | 377 // Initializes |error| with |code| and |message|. |
378 static void SetGError(GError** error, | 378 static void SetGError(GError** error, |
379 ChromeOSLoginError code, | 379 ChromeOSLoginError code, |
380 const char* message); | 380 const char* message); |
381 | 381 |
| 382 // Initializes |error| with |code| and |message|. |
| 383 static void SetAndSendGError(ChromeOSLoginError code, |
| 384 DBusGMethodInvocation* context, |
| 385 const char* message); |
| 386 |
382 // Setup any necessary signal handlers. | 387 // Setup any necessary signal handlers. |
383 void SetupHandlers(); | 388 void SetupHandlers(); |
384 | 389 |
385 // Returns true if the current user is listed in |store_| as the | 390 // Returns true if the current user is listed in |store_| as the |
386 // kDeviceOwner. Returns false if not, or if that cannot be determined. | 391 // kDeviceOwner. Returns false if not, or if that cannot be determined. |
387 // |error| is set appropriately on failure. | 392 // |error| is set appropriately on failure. |
388 gboolean CurrentUserIsOwner(GError** error); | 393 gboolean CurrentUserIsOwner(GError** error); |
389 | 394 |
390 // Returns true if the current user has the private half of |pub_key| | 395 // Returns true if the current user has the private half of |pub_key| |
391 // in his nssdb. Returns false if not, or if that cannot be determined. | 396 // in his nssdb. Returns false if not, or if that cannot be determined. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 538 |
534 bool shutting_down_; | 539 bool shutting_down_; |
535 bool shutdown_already_; | 540 bool shutdown_already_; |
536 | 541 |
537 friend class TestAPI; | 542 friend class TestAPI; |
538 DISALLOW_COPY_AND_ASSIGN(SessionManagerService); | 543 DISALLOW_COPY_AND_ASSIGN(SessionManagerService); |
539 }; | 544 }; |
540 } // namespace login_manager | 545 } // namespace login_manager |
541 | 546 |
542 #endif // LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_ | 547 #endif // LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_ |
OLD | NEW |