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

Side by Side Diff: chrome/test/testing_device_token_fetcher.cc

Issue 4960003: Don't register gmail users at the device management server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 10 years 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
(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
OLDNEW
« chrome/test/testing_device_token_fetcher.h ('K') | « chrome/test/testing_device_token_fetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698