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 | |
18 | |
19 PasswordsPrivateCanPasswordAccountBeManagedFunction:: | |
20 ~PasswordsPrivateCanPasswordAccountBeManagedFunction() {} | |
21 | |
22 ExtensionFunction::ResponseAction | |
23 PasswordsPrivateCanPasswordAccountBeManagedFunction::Run() { | |
24 scoped_ptr<base::FundamentalValue> visible(new base::FundamentalValue(true)); | |
25 return RespondNow(OneArgument(visible.Pass())); | |
26 } | |
27 | |
28 //////////////////////////////////////////////////////////////////////////////// | |
29 // PasswordsPrivateRemoveSavedPasswordFunction | 17 // PasswordsPrivateRemoveSavedPasswordFunction |
30 | 18 |
31 PasswordsPrivateRemoveSavedPasswordFunction:: | 19 PasswordsPrivateRemoveSavedPasswordFunction:: |
32 ~PasswordsPrivateRemoveSavedPasswordFunction() {} | 20 ~PasswordsPrivateRemoveSavedPasswordFunction() {} |
33 | 21 |
34 ExtensionFunction::ResponseAction | 22 ExtensionFunction::ResponseAction |
35 PasswordsPrivateRemoveSavedPasswordFunction::Run() { | 23 PasswordsPrivateRemoveSavedPasswordFunction::Run() { |
36 scoped_ptr<api::passwords_private::RemoveSavedPassword::Params> | 24 scoped_ptr<api::passwords_private::RemoveSavedPassword::Params> |
37 parameters = api::passwords_private::RemoveSavedPassword::Params:: | 25 parameters = api::passwords_private::RemoveSavedPassword::Params:: |
38 Create(*args_); | 26 Create(*args_); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 delegate->RequestShowPassword(parameters->login_pair.origin_url, | 77 delegate->RequestShowPassword(parameters->login_pair.origin_url, |
90 parameters->login_pair.username, | 78 parameters->login_pair.username, |
91 GetSenderWebContents()); | 79 GetSenderWebContents()); |
92 | 80 |
93 // No response given from this API function; instead, listeners wait for the | 81 // No response given from this API function; instead, listeners wait for the |
94 // chrome.passwordsPrivate.onPlaintextPasswordRetrieved event to fire. | 82 // chrome.passwordsPrivate.onPlaintextPasswordRetrieved event to fire. |
95 return RespondNow(NoArguments()); | 83 return RespondNow(NoArguments()); |
96 } | 84 } |
97 | 85 |
98 } // namespace extensions | 86 } // namespace extensions |
OLD | NEW |