| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/internal_auth.h" | 5 #include "chrome/browser/internal_auth.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 DISALLOW_COPY_AND_ASSIGN(InternalAuthVerificationService); | 320 DISALLOW_COPY_AND_ASSIGN(InternalAuthVerificationService); |
| 321 }; | 321 }; |
| 322 | 322 |
| 323 } // namespace browser | 323 } // namespace browser |
| 324 | 324 |
| 325 namespace { | 325 namespace { |
| 326 | 326 |
| 327 static base::LazyInstance<browser::InternalAuthVerificationService> | 327 static base::LazyInstance<browser::InternalAuthVerificationService> |
| 328 g_verification_service = LAZY_INSTANCE_INITIALIZER; | 328 g_verification_service = LAZY_INSTANCE_INITIALIZER; |
| 329 static base::LazyInstance<base::Lock, | 329 static base::LazyInstance<base::Lock>::Leaky |
| 330 base::LeakyLazyInstanceTraits<base::Lock> > | |
| 331 g_verification_service_lock = LAZY_INSTANCE_INITIALIZER; | 330 g_verification_service_lock = LAZY_INSTANCE_INITIALIZER; |
| 332 | 331 |
| 333 } // namespace | 332 } // namespace |
| 334 | 333 |
| 335 namespace browser { | 334 namespace browser { |
| 336 | 335 |
| 337 class InternalAuthGenerationService : public base::ThreadChecker { | 336 class InternalAuthGenerationService : public base::ThreadChecker { |
| 338 public: | 337 public: |
| 339 InternalAuthGenerationService() : key_regeneration_tick_(0) { | 338 InternalAuthGenerationService() : key_regeneration_tick_(0) { |
| 340 GenerateNewKey(); | 339 GenerateNewKey(); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 const std::string& domain, const VarValueMap& var_value_map) { | 470 const std::string& domain, const VarValueMap& var_value_map) { |
| 472 return g_generation_service.Get().GeneratePassport(domain, var_value_map, 0); | 471 return g_generation_service.Get().GeneratePassport(domain, var_value_map, 0); |
| 473 } | 472 } |
| 474 | 473 |
| 475 // static | 474 // static |
| 476 void InternalAuthGeneration::GenerateNewKey() { | 475 void InternalAuthGeneration::GenerateNewKey() { |
| 477 g_generation_service.Get().GenerateNewKey(); | 476 g_generation_service.Get().GenerateNewKey(); |
| 478 } | 477 } |
| 479 | 478 |
| 480 } // namespace browser | 479 } // namespace browser |
| OLD | NEW |