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

Side by Side Diff: chrome/browser/chromeos/login/mock_login_utils.cc

Issue 290513003: Move UserContext to its own file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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/login/mock_login_utils.h" 5 #include "chrome/browser/chromeos/login/mock_login_utils.h"
6 6
7 #include "chrome/browser/chromeos/login/auth/user_context.h"
8
7 using namespace testing; 9 using namespace testing;
8 10
9 namespace chromeos { 11 namespace chromeos {
10 12
11 MockLoginUtils::MockLoginUtils() {} 13 MockLoginUtils::MockLoginUtils() {}
12 14
13 MockLoginUtils::~MockLoginUtils() {} 15 MockLoginUtils::~MockLoginUtils() {}
14 16
15 void MockLoginUtils::DelegateToFake() { 17 void MockLoginUtils::DelegateToFake() {
16 if (fake_login_utils_.get()) 18 if (fake_login_utils_.get())
17 return; 19 return;
18 fake_login_utils_.reset(new FakeLoginUtils()); 20 fake_login_utils_.reset(new FakeLoginUtils());
19 FakeLoginUtils* fake = fake_login_utils_.get(); 21 FakeLoginUtils* fake = fake_login_utils_.get();
20 ON_CALL(*this, DoBrowserLaunch(_, _)) 22 ON_CALL(*this, DoBrowserLaunch(_, _))
21 .WillByDefault(Invoke(fake, &FakeLoginUtils::DoBrowserLaunch)); 23 .WillByDefault(Invoke(fake, &FakeLoginUtils::DoBrowserLaunch));
22 ON_CALL(*this, PrepareProfile(_, _, _, _, _)) 24 ON_CALL(*this, PrepareProfile(_, _, _, _, _))
23 .WillByDefault(Invoke(fake, &FakeLoginUtils::PrepareProfile)); 25 .WillByDefault(Invoke(fake, &FakeLoginUtils::PrepareProfile));
24 ON_CALL(*this, CreateAuthenticator(_)) 26 ON_CALL(*this, CreateAuthenticator(_))
25 .WillByDefault(Invoke(fake, &FakeLoginUtils::CreateAuthenticator)); 27 .WillByDefault(Invoke(fake, &FakeLoginUtils::CreateAuthenticator));
26 } 28 }
27 29
28 FakeLoginUtils* MockLoginUtils::GetFakeLoginUtils() { 30 FakeLoginUtils* MockLoginUtils::GetFakeLoginUtils() {
29 return fake_login_utils_.get(); 31 return fake_login_utils_.get();
30 } 32 }
31 33
32 } // namespace chromeos 34 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698