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

Side by Side Diff: chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc

Issue 2937553002: Create Mojo Struct for user information used in login/lock screen. (Closed)
Patch Set: rebase Created 3 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 protected: 72 protected:
73 // content::NotificationObserver override: 73 // content::NotificationObserver override:
74 void Observe(int type, 74 void Observe(int type,
75 const content::NotificationSource& source, 75 const content::NotificationSource& source,
76 const content::NotificationDetails& details) override { 76 const content::NotificationDetails& details) override {
77 const std::string& message = 77 const std::string& message =
78 content::Details<std::pair<std::string, bool*>>(details).ptr()->first; 78 content::Details<std::pair<std::string, bool*>>(details).ptr()->first;
79 if (message == kAttemptClickAuthMessage) { 79 if (message == kAttemptClickAuthMessage) {
80 proximity_auth::ScreenlockBridge::Get()->lock_handler()->SetAuthType( 80 proximity_auth::ScreenlockBridge::Get()->lock_handler()->SetAuthType(
81 test_account_id_, 81 test_account_id_, proximity_auth::mojom::AuthType::USER_CLICK,
82 proximity_auth::ScreenlockBridge::LockHandler::USER_CLICK,
83 base::string16()); 82 base::string16());
84 EasyUnlockService::Get(profile())->AttemptAuth(test_account_id_); 83 EasyUnlockService::Get(profile())->AttemptAuth(test_account_id_);
85 } 84 }
86 } 85 }
87 86
88 // Loads |extension_name| and waits for a pass / fail notification. 87 // Loads |extension_name| and waits for a pass / fail notification.
89 void RunTest(const std::string& extension_name) { 88 void RunTest(const std::string& extension_name) {
90 ASSERT_TRUE(RunComponentExtensionTest(extension_name)) << message_; 89 ASSERT_TRUE(RunComponentExtensionTest(extension_name)) << message_;
91 } 90 }
92 91
(...skipping 19 matching lines...) Expand all
112 RunTest("screenlock_private/lock_unlock"); 111 RunTest("screenlock_private/lock_unlock");
113 } 112 }
114 113
115 IN_PROC_BROWSER_TEST_F(ScreenlockPrivateApiTest, AuthType) { 114 IN_PROC_BROWSER_TEST_F(ScreenlockPrivateApiTest, AuthType) {
116 RunTest("screenlock_private/auth_type"); 115 RunTest("screenlock_private/auth_type");
117 } 116 }
118 117
119 #endif // defined(OS_CHROMEOS) 118 #endif // defined(OS_CHROMEOS)
120 119
121 } // namespace extensions 120 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698