OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/install_signer.h" | 5 #include "chrome/browser/extensions/install_signer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 299 |
300 std::vector<std::string> ids = base::SplitString( | 300 std::vector<std::string> ids = base::SplitString( |
301 value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 301 value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
302 return ExtensionIdSet(ids.begin(), ids.end()); | 302 return ExtensionIdSet(ids.begin(), ids.end()); |
303 } | 303 } |
304 | 304 |
305 namespace { | 305 namespace { |
306 | 306 |
307 static int g_request_count = 0; | 307 static int g_request_count = 0; |
308 | 308 |
309 base::LazyInstance<base::TimeTicks> g_last_request_time = | 309 base::LazyInstance<base::TimeTicks>::DestructorAtExit g_last_request_time = |
310 LAZY_INSTANCE_INITIALIZER; | 310 LAZY_INSTANCE_INITIALIZER; |
311 | 311 |
312 base::LazyInstance<base::ThreadChecker> g_single_thread_checker = | 312 base::LazyInstance<base::ThreadChecker>::DestructorAtExit |
313 LAZY_INSTANCE_INITIALIZER; | 313 g_single_thread_checker = LAZY_INSTANCE_INITIALIZER; |
314 | 314 |
315 void LogRequestStartHistograms() { | 315 void LogRequestStartHistograms() { |
316 // Make sure we only ever call this from one thread, so that we don't have to | 316 // Make sure we only ever call this from one thread, so that we don't have to |
317 // worry about race conditions setting g_last_request_time. | 317 // worry about race conditions setting g_last_request_time. |
318 DCHECK(g_single_thread_checker.Get().CalledOnValidThread()); | 318 DCHECK(g_single_thread_checker.Get().CalledOnValidThread()); |
319 | 319 |
320 // CurrentProcessInfo::CreationTime is only defined on some platforms. | 320 // CurrentProcessInfo::CreationTime is only defined on some platforms. |
321 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) | 321 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) |
322 const base::Time process_creation_time = | 322 const base::Time process_creation_time = |
323 base::CurrentProcessInfo::CreationTime(); | 323 base::CurrentProcessInfo::CreationTime(); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 if (!verified) | 505 if (!verified) |
506 result.reset(); | 506 result.reset(); |
507 } | 507 } |
508 | 508 |
509 if (!callback_.is_null()) | 509 if (!callback_.is_null()) |
510 callback_.Run(std::move(result)); | 510 callback_.Run(std::move(result)); |
511 } | 511 } |
512 | 512 |
513 | 513 |
514 } // namespace extensions | 514 } // namespace extensions |
OLD | NEW |