OLD | NEW |
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 #include "chrome/browser/extensions/api/passwords_private/passwords_private_api.
h" | 5 #include "chrome/browser/extensions/api/passwords_private/passwords_private_api.
h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_factory.h" | 8 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_factory.h" |
9 #include "chrome/common/extensions/api/passwords_private.h" | 9 #include "chrome/common/extensions/api/passwords_private.h" |
10 #include "components/password_manager/core/common/experiments.h" | 10 #include "components/password_manager/core/common/experiments.h" |
11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
12 #include "extensions/browser/extension_function_registry.h" | 12 #include "extensions/browser/extension_function_registry.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
17 // PasswordsPrivateCanPasswordAccountBeManagedFunction | 17 // PasswordsPrivateCanPasswordAccountBeManagedFunction |
18 | 18 |
19 PasswordsPrivateCanPasswordAccountBeManagedFunction:: | 19 PasswordsPrivateCanPasswordAccountBeManagedFunction:: |
20 ~PasswordsPrivateCanPasswordAccountBeManagedFunction() {} | 20 ~PasswordsPrivateCanPasswordAccountBeManagedFunction() {} |
21 | 21 |
22 ExtensionFunction::ResponseAction | 22 ExtensionFunction::ResponseAction |
23 PasswordsPrivateCanPasswordAccountBeManagedFunction::Run() { | 23 PasswordsPrivateCanPasswordAccountBeManagedFunction::Run() { |
24 scoped_ptr<base::FundamentalValue> visible(new base::FundamentalValue( | 24 scoped_ptr<base::FundamentalValue> visible(new base::FundamentalValue(true)); |
25 password_manager::ManageAccountLinkExperimentEnabled())); | |
26 return RespondNow(OneArgument(visible.Pass())); | 25 return RespondNow(OneArgument(visible.Pass())); |
27 } | 26 } |
28 | 27 |
29 //////////////////////////////////////////////////////////////////////////////// | 28 //////////////////////////////////////////////////////////////////////////////// |
30 // PasswordsPrivateRemoveSavedPasswordFunction | 29 // PasswordsPrivateRemoveSavedPasswordFunction |
31 | 30 |
32 PasswordsPrivateRemoveSavedPasswordFunction:: | 31 PasswordsPrivateRemoveSavedPasswordFunction:: |
33 ~PasswordsPrivateRemoveSavedPasswordFunction() {} | 32 ~PasswordsPrivateRemoveSavedPasswordFunction() {} |
34 | 33 |
35 ExtensionFunction::ResponseAction | 34 ExtensionFunction::ResponseAction |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 delegate->RequestShowPassword(parameters->login_pair.origin_url, | 89 delegate->RequestShowPassword(parameters->login_pair.origin_url, |
91 parameters->login_pair.username, | 90 parameters->login_pair.username, |
92 GetSenderWebContents()); | 91 GetSenderWebContents()); |
93 | 92 |
94 // No response given from this API function; instead, listeners wait for the | 93 // No response given from this API function; instead, listeners wait for the |
95 // chrome.passwordsPrivate.onPlaintextPasswordRetrieved event to fire. | 94 // chrome.passwordsPrivate.onPlaintextPasswordRetrieved event to fire. |
96 return RespondNow(NoArguments()); | 95 return RespondNow(NoArguments()); |
97 } | 96 } |
98 | 97 |
99 } // namespace extensions | 98 } // namespace extensions |
OLD | NEW |