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

Unified Diff: chrome/browser/chromeos/cros/cert_library.cc

Issue 13004024: Add ConnectToBestServices call when Certs are loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only call ConnectToBestWifi on intial cert load Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/cert_library.cc
diff --git a/chrome/browser/chromeos/cros/cert_library.cc b/chrome/browser/chromeos/cros/cert_library.cc
index 84ba2812f7f99a7f8b9ee923dece0ed9258fddf4..a5269e6fd925a29561f83c5824bc26b9e9f17c33 100644
--- a/chrome/browser/chromeos/cros/cert_library.cc
+++ b/chrome/browser/chromeos/cros/cert_library.cc
@@ -599,14 +599,74 @@ class CertLibraryImpl
//////////////////////////////////////////////////////////////////////////////
+class CertLibraryImplStub : public CertLibrary {
+ public:
+ CertLibraryImplStub()
+ : token_name_("StubToken"),
+ ALLOW_THIS_IN_INITIALIZER_LIST(cert_list_(this)) {
+ }
+ virtual ~CertLibraryImplStub() {}
+
+ virtual void AddObserver(Observer* observer) {}
+ virtual void RemoveObserver(Observer* observer) {}
+ virtual void LoadKeyStore() {}
+ virtual bool CertificatesLoading() const {
+ return false;
+ }
+ virtual bool CertificatesLoaded() const {
+ return true;
+ }
+ virtual bool IsHardwareBacked() const {
+ return false;
+ }
+ virtual const std::string& GetTpmTokenName() const {
+ return token_name_;
+ }
+ virtual const CertList& GetCertificates() const {
+ return cert_list_;
+ }
+ virtual const CertList& GetUserCertificates() const {
+ return cert_list_;
+ }
+ virtual const CertList& GetServerCertificates() const {
+ return cert_list_;
+ }
+ virtual const CertList& GetCACertificates() const {
+ return cert_list_;
+ }
+ virtual std::string EncryptWithSystemSalt(const std::string& token) {
+ return token;
+ }
+ virtual std::string DecryptWithSystemSalt(
+ const std::string& encrypted_token_hex) {
+ return encrypted_token_hex;
+ }
+ virtual std::string EncryptWithUserKey(const std::string& token) {
+ return token;
Greg Spencer (Chromium) 2013/04/01 19:37:18 I'd almost like to see rot13 or something implemen
stevenjb 2013/04/01 20:34:48 At some point I agree, along with some actual test
+ }
+ virtual std::string DecryptWithUserKey(
+ const std::string& encrypted_token_hex) {
+ return encrypted_token_hex;
+ }
+
+ private:
+ std::string token_name_;
+ CertList cert_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(CertLibraryImplStub);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
CertLibrary::~CertLibrary() {
}
// static
CertLibrary* CertLibrary::GetImpl(bool stub) {
- // |stub| is ignored since we have no stub of CertLibrary.
// TODO(stevenjb): Disassociate CertLibrary from CrosLibrary entirely.
// crbug.com/133752
+ if (stub)
+ return new CertLibraryImplStub();
return new CertLibraryImpl();
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/network_login_observer.h » ('j') | chromeos/network/shill_property_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698