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

Side by Side Diff: chrome/browser/supervised_user/permission_request_creator_apiary_unittest.cc

Issue 652473004: Standardize usage of virtual/override/final in chrome/browser/supervised_user/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" 9 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
10 #include "chrome/browser/supervised_user/permission_request_creator_apiary.h" 10 #include "chrome/browser/supervised_user/permission_request_creator_apiary.h"
(...skipping 18 matching lines...) Expand all
29 base::JSONWriter::Write(&dict, &result); 29 base::JSONWriter::Write(&dict, &result);
30 return result; 30 return result;
31 } 31 }
32 32
33 class FakeSupervisedUserSigninManagerWrapper 33 class FakeSupervisedUserSigninManagerWrapper
34 : public SupervisedUserSigninManagerWrapper { 34 : public SupervisedUserSigninManagerWrapper {
35 public: 35 public:
36 FakeSupervisedUserSigninManagerWrapper() 36 FakeSupervisedUserSigninManagerWrapper()
37 : SupervisedUserSigninManagerWrapper(NULL, NULL) {} 37 : SupervisedUserSigninManagerWrapper(NULL, NULL) {}
38 38
39 virtual std::string GetEffectiveUsername() const override { 39 std::string GetEffectiveUsername() const override { return kAccountId; }
40 return kAccountId; 40 std::string GetAccountIdToUse() const override { return kAccountId; }
41 } 41 std::string GetSyncScopeToUse() const override { return kApiScope; }
42 virtual std::string GetAccountIdToUse() const override {
43 return kAccountId;
44 }
45 virtual std::string GetSyncScopeToUse() const override {
46 return kApiScope;
47 }
48 }; 42 };
49 43
50 } // namespace 44 } // namespace
51 45
52 class PermissionRequestCreatorApiaryTest : public testing::Test { 46 class PermissionRequestCreatorApiaryTest : public testing::Test {
53 public: 47 public:
54 PermissionRequestCreatorApiaryTest() 48 PermissionRequestCreatorApiaryTest()
55 : request_context_(new net::TestURLRequestContextGetter( 49 : request_context_(new net::TestURLRequestContextGetter(
56 base::MessageLoopProxy::current())), 50 base::MessageLoopProxy::current())),
57 permission_creator_( 51 permission_creator_(
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 146
153 // We should have gotten a request for an access token. 147 // We should have gotten a request for an access token.
154 EXPECT_EQ(1U, token_service_.GetPendingRequests().size()); 148 EXPECT_EQ(1U, token_service_.GetPendingRequests().size());
155 149
156 IssueAccessTokens(); 150 IssueAccessTokens();
157 151
158 // Our callback should get called on an error. 152 // Our callback should get called on an error.
159 EXPECT_CALL(*this, OnRequestCreated(false)); 153 EXPECT_CALL(*this, OnRequestCreated(false));
160 SendFailedResponse(0); 154 SendFailedResponse(0);
161 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698