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

Side by Side Diff: chrome/browser/extensions/api/platform_keys/platform_keys_api.h

Issue 847333004: Move parts from enterprise.platformKeysInternal to platformKeysInternal for reuse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_idl
Patch Set: Rebased. Created 5 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_
7
8 #include <string>
9
10 #include "chrome/browser/extensions/chrome_extension_function.h"
11
12 namespace extensions {
13 namespace platform_keys {
14
15 extern const char kErrorInvalidToken[];
16
17 // Returns whether |token_id| references a known Token.
18 bool ValidateToken(const std::string& token_id,
19 std::string* platform_keys_token_id);
20
21 // Converts a token id from ::chromeos::platform_keys to the platformKeys API
22 // token id.
23 std::string PlatformKeysTokenIdToApiId(
24 const std::string& platform_keys_token_id);
25
26 } // namespace platform_keys
27
28 class PlatformKeysInternalSignFunction
29 : public ChromeUIThreadExtensionFunction {
30 private:
31 ~PlatformKeysInternalSignFunction() override;
32 ResponseAction Run() override;
33
34 // Called when the signature was generated. If an error occurred,
35 // |signature| will be empty and instead |error_message| be set.
36 void OnSigned(const std::string& signature, const std::string& error_message);
37
38 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.sign",
39 PLATFORMKEYSINTERNAL_SIGN);
40 };
41
42 } // namespace extensions
43
44 #endif // CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698