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

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

Issue 5174006: Move DeviceManagementPolicyProvider into the profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback. Created 10 years, 1 month 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/device_management_test_util.h"
6
7 #include <string>
8
9 #include "chrome/browser/net/gaia/token_service.h"
10 #include "chrome/common/net/gaia/gaia_constants.h"
11 #include "chrome/common/notification_service.h"
12 #include "chrome/common/notification_source.h"
13 #include "chrome/common/notification_type.h"
14
15 namespace policy {
16
17 namespace {
18
19 static const char kFakeGaiaAuthToken[] = "FakeGAIAToken";
20
21 } // namespace
22
23 void SimulateSuccessfulLogin() {
24 const std::string service(GaiaConstants::kDeviceManagementService);
25 const std::string auth_token(kFakeGaiaAuthToken);
26 TokenService::TokenAvailableDetails details(service, auth_token);
27 NotificationService::current()->Notify(
28 NotificationType::TOKEN_AVAILABLE,
29 Source<TokenService>(NULL),
30 Details<const TokenService::TokenAvailableDetails>(&details));
31 }
32
33 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698