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

Unified Diff: chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc

Issue 356713005: Rename ServerBoundCert => ChannelID to reflect the current name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix cookies_list.js Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc
diff --git a/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc b/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc
deleted file mode 100644
index 85a02b9fcc1afbf77f48206f95129961a68a71a3..0000000000000000000000000000000000000000
--- a/chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/browsing_data/mock_browsing_data_server_bound_cert_helper.h"
-
-#include "base/logging.h"
-
-MockBrowsingDataServerBoundCertHelper::MockBrowsingDataServerBoundCertHelper()
- : BrowsingDataServerBoundCertHelper() {}
-
-MockBrowsingDataServerBoundCertHelper::
-~MockBrowsingDataServerBoundCertHelper() {}
-
-void MockBrowsingDataServerBoundCertHelper::StartFetching(
- const FetchResultCallback& callback) {
- callback_ = callback;
-}
-
-void MockBrowsingDataServerBoundCertHelper::DeleteServerBoundCert(
- const std::string& server_id) {
- CHECK(server_bound_certs_.find(server_id) != server_bound_certs_.end());
- server_bound_certs_[server_id] = false;
-}
-
-void MockBrowsingDataServerBoundCertHelper::AddServerBoundCertSample(
- const std::string& server_id) {
- DCHECK(server_bound_certs_.find(server_id) == server_bound_certs_.end());
- server_bound_cert_list_.push_back(
- net::ServerBoundCertStore::ServerBoundCert(
- server_id, base::Time(), base::Time(), "key", "cert"));
- server_bound_certs_[server_id] = true;
-}
-
-void MockBrowsingDataServerBoundCertHelper::Notify() {
- net::ServerBoundCertStore::ServerBoundCertList cert_list;
- for (net::ServerBoundCertStore::ServerBoundCertList::iterator i =
- server_bound_cert_list_.begin();
- i != server_bound_cert_list_.end(); ++i) {
- if (server_bound_certs_[i->server_identifier()])
- cert_list.push_back(*i);
- }
- callback_.Run(cert_list);
-}
-
-void MockBrowsingDataServerBoundCertHelper::Reset() {
- for (std::map<const std::string, bool>::iterator i =
- server_bound_certs_.begin();
- i != server_bound_certs_.end(); ++i)
- i->second = true;
-}
-
-bool MockBrowsingDataServerBoundCertHelper::AllDeleted() {
- for (std::map<const std::string, bool>::const_iterator i =
- server_bound_certs_.begin();
- i != server_bound_certs_.end(); ++i)
- if (i->second)
- return false;
- return true;
-}

Powered by Google App Engine
This is Rietveld 408576698