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

Side by Side Diff: net/cert/test_root_certs_android.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/cert/test_root_certs.cc ('k') | net/cert/test_root_certs_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #include "net/cert/test_root_certs.h"
6
7 #include "base/location.h"
8 #include "base/logging.h"
9 #include "net/android/network_library.h"
10 #include "net/cert/x509_certificate.h"
11
12 namespace net {
13
14 bool TestRootCerts::Add(X509Certificate* certificate) {
15 std::string cert_bytes;
16 if (!X509Certificate::GetDEREncoded(certificate->os_cert_handle(),
17 &cert_bytes))
18 return false;
19 android::AddTestRootCertificate(
20 reinterpret_cast<const uint8*>(cert_bytes.data()), cert_bytes.size());
21 empty_ = false;
22 return true;
23 }
24
25 void TestRootCerts::Clear() {
26 if (empty_)
27 return;
28
29 android::ClearTestRootCertificates();
30 empty_ = true;
31 }
32
33 bool TestRootCerts::IsEmpty() const {
34 return empty_;
35 }
36
37 TestRootCerts::~TestRootCerts() {}
38
39 void TestRootCerts::Init() {
40 empty_ = true;
41 }
42
43 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/test_root_certs.cc ('k') | net/cert/test_root_certs_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698