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

Side by Side Diff: ash/test/test_session_state_delegate.cc

Issue 683623002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ash/test/test_session_state_delegate.h ('k') | ash/test/test_shelf_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/test/test_session_state_delegate.h" 5 #include "ash/test/test_session_state_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 14 matching lines...) Expand all
25 std::string user_id = email; 25 std::string user_id = email;
26 std::transform(user_id.begin(), user_id.end(), user_id.begin(), ::tolower); 26 std::transform(user_id.begin(), user_id.end(), user_id.begin(), ::tolower);
27 return user_id; 27 return user_id;
28 } 28 }
29 29
30 } // namespace 30 } // namespace
31 31
32 class MockUserInfo : public user_manager::UserInfo { 32 class MockUserInfo : public user_manager::UserInfo {
33 public: 33 public:
34 explicit MockUserInfo(const std::string& id) : email_(id) {} 34 explicit MockUserInfo(const std::string& id) : email_(id) {}
35 virtual ~MockUserInfo() {} 35 ~MockUserInfo() override {}
36 36
37 void SetUserImage(const gfx::ImageSkia& user_image) { 37 void SetUserImage(const gfx::ImageSkia& user_image) {
38 user_image_ = user_image; 38 user_image_ = user_image;
39 } 39 }
40 40
41 virtual base::string16 GetDisplayName() const override { 41 base::string16 GetDisplayName() const override {
42 return base::UTF8ToUTF16("Über tray Über tray Über tray Über tray"); 42 return base::UTF8ToUTF16("Über tray Über tray Über tray Über tray");
43 } 43 }
44 44
45 virtual base::string16 GetGivenName() const override { 45 base::string16 GetGivenName() const override {
46 return base::UTF8ToUTF16("Über Über Über Über"); 46 return base::UTF8ToUTF16("Über Über Über Über");
47 } 47 }
48 48
49 virtual std::string GetEmail() const override { return email_; } 49 std::string GetEmail() const override { return email_; }
50 50
51 virtual std::string GetUserID() const override { 51 std::string GetUserID() const override {
52 return GetUserIDFromEmail(GetEmail()); 52 return GetUserIDFromEmail(GetEmail());
53 } 53 }
54 54
55 virtual const gfx::ImageSkia& GetImage() const override { 55 const gfx::ImageSkia& GetImage() const override { return user_image_; }
56 return user_image_;
57 }
58 56
59 // A test user image. 57 // A test user image.
60 gfx::ImageSkia user_image_; 58 gfx::ImageSkia user_image_;
61 59
62 std::string email_; 60 std::string email_;
63 61
64 DISALLOW_COPY_AND_ASSIGN(MockUserInfo); 62 DISALLOW_COPY_AND_ASSIGN(MockUserInfo);
65 }; 63 };
66 64
67 TestSessionStateDelegate::TestSessionStateDelegate() 65 TestSessionStateDelegate::TestSessionStateDelegate()
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void TestSessionStateDelegate::AddSessionStateObserver( 233 void TestSessionStateDelegate::AddSessionStateObserver(
236 SessionStateObserver* observer) { 234 SessionStateObserver* observer) {
237 } 235 }
238 236
239 void TestSessionStateDelegate::RemoveSessionStateObserver( 237 void TestSessionStateDelegate::RemoveSessionStateObserver(
240 SessionStateObserver* observer) { 238 SessionStateObserver* observer) {
241 } 239 }
242 240
243 } // namespace test 241 } // namespace test
244 } // namespace ash 242 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_session_state_delegate.h ('k') | ash/test/test_shelf_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698