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

Side by Side Diff: chrome/browser/internal_auth.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 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
OLDNEW
1 // Copyright (c) 2012 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // That means that we must not trust any tick less than or equal to dark tick. 317 // That means that we must not trust any tick less than or equal to dark tick.
318 int64_t dark_tick_; 318 int64_t dark_tick_;
319 319
320 DISALLOW_COPY_AND_ASSIGN(InternalAuthVerificationService); 320 DISALLOW_COPY_AND_ASSIGN(InternalAuthVerificationService);
321 }; 321 };
322 322
323 } // namespace chrome 323 } // namespace chrome
324 324
325 namespace { 325 namespace {
326 326
327 static base::LazyInstance<chrome::InternalAuthVerificationService> 327 static base::LazyInstance<chrome::InternalAuthVerificationService>::
328 g_verification_service = LAZY_INSTANCE_INITIALIZER; 328 DestructorAtExit g_verification_service = LAZY_INSTANCE_INITIALIZER;
329 static base::LazyInstance<base::Lock>::Leaky 329 static base::LazyInstance<base::Lock>::Leaky
330 g_verification_service_lock = LAZY_INSTANCE_INITIALIZER; 330 g_verification_service_lock = LAZY_INSTANCE_INITIALIZER;
331 331
332 } // namespace 332 } // namespace
333 333
334 namespace chrome { 334 namespace chrome {
335 335
336 class InternalAuthGenerationService : public base::ThreadChecker { 336 class InternalAuthGenerationService : public base::ThreadChecker {
337 public: 337 public:
338 InternalAuthGenerationService() : key_regeneration_tick_(0) { 338 InternalAuthGenerationService() : key_regeneration_tick_(0) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 int64_t key_regeneration_tick_; 425 int64_t key_regeneration_tick_;
426 std::deque<int64_t> used_ticks_; 426 std::deque<int64_t> used_ticks_;
427 427
428 DISALLOW_COPY_AND_ASSIGN(InternalAuthGenerationService); 428 DISALLOW_COPY_AND_ASSIGN(InternalAuthGenerationService);
429 }; 429 };
430 430
431 } // namespace chrome 431 } // namespace chrome
432 432
433 namespace { 433 namespace {
434 434
435 static base::LazyInstance<chrome::InternalAuthGenerationService> 435 static base::LazyInstance<chrome::InternalAuthGenerationService>::
436 g_generation_service = LAZY_INSTANCE_INITIALIZER; 436 DestructorAtExit g_generation_service = LAZY_INSTANCE_INITIALIZER;
437 437
438 } // namespace 438 } // namespace
439 439
440 namespace chrome { 440 namespace chrome {
441 441
442 // static 442 // static
443 bool InternalAuthVerification::VerifyPassport( 443 bool InternalAuthVerification::VerifyPassport(
444 const std::string& passport, 444 const std::string& passport,
445 const std::string& domain, 445 const std::string& domain,
446 const VarValueMap& var_value_map) { 446 const VarValueMap& var_value_map) {
(...skipping 24 matching lines...) Expand all
471 const std::string& domain, const VarValueMap& var_value_map) { 471 const std::string& domain, const VarValueMap& var_value_map) {
472 return g_generation_service.Get().GeneratePassport(domain, var_value_map, 0); 472 return g_generation_service.Get().GeneratePassport(domain, var_value_map, 0);
473 } 473 }
474 474
475 // static 475 // static
476 void InternalAuthGeneration::GenerateNewKey() { 476 void InternalAuthGeneration::GenerateNewKey() {
477 g_generation_service.Get().GenerateNewKey(); 477 g_generation_service.Get().GenerateNewKey();
478 } 478 }
479 479
480 } // namespace chrome 480 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/media/router/media_router_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698