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

Side by Side Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager_test.h

Issue 1428213004: This CL replaces std::string user_id in ash/* with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_TEST_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_TEST_H_
6 #define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_TEST_H_ 6 #define CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_TEST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" 9 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
10 #include "components/signin/core/account_id/account_id.h"
10 11
11 // This is a test implementation of a MultiUserWindowManager which allows to 12 // This is a test implementation of a MultiUserWindowManager which allows to
12 // test a visiting window on another desktop. It will install and remove itself 13 // test a visiting window on another desktop. It will install and remove itself
13 // from the system upon creation / destruction. 14 // from the system upon creation / destruction.
14 // The creation function gets a |browser| which is shown on |desktop_owner|'s 15 // The creation function gets a |browser| which is shown on |desktop_owner|'s
15 // desktop. 16 // desktop.
16 class TestMultiUserWindowManager : public chrome::MultiUserWindowManager { 17 class TestMultiUserWindowManager : public chrome::MultiUserWindowManager {
17 public: 18 public:
18 TestMultiUserWindowManager(Browser* visiting_browser, 19 TestMultiUserWindowManager(Browser* visiting_browser,
19 const std::string& desktop_owner); 20 const AccountId& desktop_owner);
20 ~TestMultiUserWindowManager() override; 21 ~TestMultiUserWindowManager() override;
21 22
22 aura::Window* created_window() { return created_window_; } 23 aura::Window* created_window() { return created_window_; }
23 24
24 // MultiUserWindowManager overrides: 25 // MultiUserWindowManager overrides:
25 void SetWindowOwner(aura::Window* window, 26 void SetWindowOwner(aura::Window* window,
26 const std::string& user_id) override; 27 const AccountId& account_id) override;
27 const std::string& GetWindowOwner(aura::Window* window) const override; 28 const AccountId& GetWindowOwner(aura::Window* window) const override;
28 void ShowWindowForUser(aura::Window* window, 29 void ShowWindowForUser(aura::Window* window,
29 const std::string& user_id) override; 30 const AccountId& account_id) override;
30 bool AreWindowsSharedAmongUsers() const override; 31 bool AreWindowsSharedAmongUsers() const override;
31 void GetOwnersOfVisibleWindows( 32 void GetOwnersOfVisibleWindows(
32 std::set<std::string>* user_ids) const override; 33 std::set<AccountId>* account_ids) const override;
33 bool IsWindowOnDesktopOfUser(aura::Window* window, 34 bool IsWindowOnDesktopOfUser(aura::Window* window,
34 const std::string& user_id) const override; 35 const AccountId& account_id) const override;
35 const std::string& GetUserPresentingWindow( 36 const AccountId& GetUserPresentingWindow(aura::Window* window) const override;
36 aura::Window* window) const override;
37 void AddUser(content::BrowserContext* profile) override; 37 void AddUser(content::BrowserContext* profile) override;
38 void AddObserver(Observer* observer) override; 38 void AddObserver(Observer* observer) override;
39 void RemoveObserver(Observer* observer) override; 39 void RemoveObserver(Observer* observer) override;
40 40
41 private: 41 private:
42 // The window of the visiting browser. 42 // The window of the visiting browser.
43 aura::Window* browser_window_; 43 aura::Window* browser_window_;
44 // The owner of the visiting browser. 44 // The owner of the visiting browser.
45 std::string browser_owner_; 45 AccountId browser_owner_;
46 // The owner of the currently shown desktop. 46 // The owner of the currently shown desktop.
47 std::string desktop_owner_; 47 AccountId desktop_owner_;
48 // The created window. 48 // The created window.
49 aura::Window* created_window_; 49 aura::Window* created_window_;
50 // The location of the window. 50 // The location of the window.
51 std::string created_window_shown_for_; 51 AccountId created_window_shown_for_;
52 // The current selected active user. 52 // The current selected active user.
53 std::string current_user_id_; 53 AccountId current_account_id_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(TestMultiUserWindowManager); 55 DISALLOW_COPY_AND_ASSIGN(TestMultiUserWindowManager);
56 }; 56 };
57 57
58 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_TEST_H_ 58 #endif // CHROME_BROWSER_UI_ASH_MULTI_USER_MULTI_USER_WINDOW_MANAGER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698