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

Side by Side Diff: chrome/common/extensions/api/networking_private/networking_private_crypto.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 #include "chrome/common/extensions/api/networking_private/networking_private_cry pto.h" 5 #include "chrome/common/extensions/api/networking_private/networking_private_cry pto.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "extensions/common/cast/cast_cert_validator.h" 10 #include "extensions/common/cast/cast_cert_validator.h"
11 #include "net/cert/pem_tokenizer.h" 11 #include "net/cert/pem_tokenizer.h"
12 12
13 namespace { 13 namespace {
14 14
15 namespace cast_crypto = ::extensions::core_api::cast_crypto; 15 namespace cast_crypto = ::extensions::api::cast_crypto;
16 16
17 } // namespace 17 } // namespace
18 18
19 namespace networking_private_crypto { 19 namespace networking_private_crypto {
20 20
21 bool VerifyCredentials( 21 bool VerifyCredentials(
22 const std::string& certificate, 22 const std::string& certificate,
23 const std::vector<std::string>& intermediate_certificates, 23 const std::vector<std::string>& intermediate_certificates,
24 const std::string& signature, 24 const std::string& signature,
25 const std::string& data, 25 const std::string& data,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 verification_context->VerifySignatureOverData(signature, data); 77 verification_context->VerifySignatureOverData(signature, data);
78 78
79 if (verification_result.Failure()) { 79 if (verification_result.Failure()) {
80 LOG(ERROR) << kErrorPrefix << verification_result.GetLogString(); 80 LOG(ERROR) << kErrorPrefix << verification_result.GetLogString();
81 return false; 81 return false;
82 } 82 }
83 return true; 83 return true;
84 } 84 }
85 85
86 } // namespace networking_private_crypto 86 } // namespace networking_private_crypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698