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

Side by Side Diff: components/os_crypt/os_crypt.h

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_OS_CRYPT_OS_CRYPT_H_ 5 #ifndef COMPONENTS_OS_CRYPT_OS_CRYPT_H_
6 #define COMPONENTS_OS_CRYPT_OS_CRYPT_H_ 6 #define COMPONENTS_OS_CRYPT_OS_CRYPT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h"
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 12
12 // The OSCrypt class gives access to simple encryption and decryption of 13 // The OSCrypt class gives access to simple encryption and decryption of
13 // strings. Note that on Mac, access to the system Keychain is required and 14 // strings. Note that on Mac, access to the system Keychain is required and
14 // these calls can block the current thread to collect user input. 15 // these calls can block the current thread to collect user input.
15 class OSCrypt { 16 class OSCrypt {
16 public: 17 public:
17 // Encrypt a string16. The output (second argument) is really an array of 18 // Encrypt a string16. The output (second argument) is really an array of
18 // bytes, but we're passing it back as a std::string. 19 // bytes, but we're passing it back as a std::string.
19 static bool EncryptString16(const base::string16& plaintext, 20 static bool EncryptString16(const base::string16& plaintext,
(...skipping 19 matching lines...) Expand all
39 // For unit testing purposes we instruct the Encryptor to use a mock Keychain 40 // For unit testing purposes we instruct the Encryptor to use a mock Keychain
40 // on the Mac. The default is to use the real Keychain. 41 // on the Mac. The default is to use the real Keychain.
41 static void UseMockKeychain(bool use_mock); 42 static void UseMockKeychain(bool use_mock);
42 #endif 43 #endif
43 44
44 private: 45 private:
45 DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt); 46 DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt);
46 }; 47 };
47 48
48 #endif // COMPONENTS_OS_CRYPT_OS_CRYPT_H_ 49 #endif // COMPONENTS_OS_CRYPT_OS_CRYPT_H_
OLDNEW
« no previous file with comments | « components/html_viewer/ime_controller.h ('k') | components/proximity_auth/webui/proximity_auth_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698