OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/test/testing_device_token_fetcher.h" | |
6 | |
7 #include "chrome/browser/profile.h" | |
8 #include "chrome/browser/policy/device_token_fetcher.h" | |
Mattias Nissler (ping if slow)
2010/11/23 16:00:44
alphabetize.
gfeher
2010/11/24 19:38:40
Done.
| |
9 #include "chrome/common/notification_service.h" | |
10 #include "chrome/common/notification_source.h" | |
11 #include "chrome/common/notification_type.h" | |
12 #if defined(OS_CHROMEOS) | |
Mattias Nissler (ping if slow)
2010/11/23 16:00:44
Put a newline before in order to establish this as
gfeher
2010/11/24 19:38:40
Done.
| |
13 #include "chrome/browser/chromeos/login/user_manager.h" | |
14 #else | |
15 #include "chrome/browser/sync/signin_manager.h" | |
16 #endif | |
17 | |
18 namespace policy { | |
19 | |
20 const char* kTestDasherDomainUsername = "___@example.com"; | |
21 | |
22 void TestingDeviceTokenFetcher::SimulateLogin(const std::string& username) { | |
23 username_ = username; | |
24 #if defined(OS_CHROMEOS) | |
25 chromeos::UserManager::User user; | |
26 user.set_email(username_); | |
27 NotificationService::current()->Notify( | |
28 NotificationType::LOGIN_USER_CHANGED, | |
29 Source<chromeos::UserManager>(NULL), | |
30 Details<const chromeos::UserManager::User>(&user)); | |
31 #else | |
32 GoogleServiceSigninSuccessDetails details(username_, ""); | |
33 NotificationService::current()->Notify( | |
34 NotificationType::GOOGLE_SIGNIN_SUCCESSFUL, | |
35 Source<Profile>(profile_), | |
36 Details<const GoogleServiceSigninSuccessDetails>(&details)); | |
37 #endif | |
38 } | |
39 | |
40 } // namespace policy | |
OLD | NEW |