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

Side by Side Diff: chrome/browser/devtools/device/usb/android_rsa.cc

Issue 2459823002: [Sync] Rename syncable_prefs to sync_preferences. (Closed)
Patch Set: Created 4 years, 1 month 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 #include "chrome/browser/devtools/device/usb/android_rsa.h" 5 #include "chrome/browser/devtools/device/usb/android_rsa.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 10
11 #include <limits> 11 #include <limits>
12 #include <memory> 12 #include <memory>
13 13
14 #include "base/base64.h" 14 #include "base/base64.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "components/syncable_prefs/pref_service_syncable.h" 17 #include "components/sync_preferences/pref_service_syncable.h"
18 #include "crypto/rsa_private_key.h" 18 #include "crypto/rsa_private_key.h"
19 #include "crypto/signature_creator.h" 19 #include "crypto/signature_creator.h"
20 #include "net/cert/asn1_util.h" 20 #include "net/cert/asn1_util.h"
21 21
22 namespace { 22 namespace {
23 23
24 const size_t kRSANumWords = 64; 24 const size_t kRSANumWords = 64;
25 const size_t kBigIntSize = 1024; 25 const size_t kBigIntSize = 1024;
26 26
27 static const char kDummyRSAPublicKey[] = 27 static const char kDummyRSAPublicKey[] =
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 std::string AndroidRSASign(crypto::RSAPrivateKey* key, 271 std::string AndroidRSASign(crypto::RSAPrivateKey* key,
272 const std::string& body) { 272 const std::string& body) {
273 std::vector<uint8_t> digest(body.begin(), body.end()); 273 std::vector<uint8_t> digest(body.begin(), body.end());
274 std::vector<uint8_t> result; 274 std::vector<uint8_t> result;
275 if (!crypto::SignatureCreator::Sign(key, crypto::SignatureCreator::SHA1, 275 if (!crypto::SignatureCreator::Sign(key, crypto::SignatureCreator::SHA1,
276 digest.data(), digest.size(), &result)) { 276 digest.data(), digest.size(), &result)) {
277 return std::string(); 277 return std::string();
278 } 278 }
279 return std::string(result.begin(), result.end()); 279 return std::string(result.begin(), result.end());
280 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc ('k') | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698