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

Side by Side Diff: chrome/browser/metrics/metrics_service.cc

Issue 339059: Add compiler-specific "examine printf format" attributes to printfs. (Closed)
Patch Set: cleanups Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 5
6 6
7 //------------------------------------------------------------------------------ 7 //------------------------------------------------------------------------------
8 // Description of the life cycle of a instance of MetricsService. 8 // Description of the life cycle of a instance of MetricsService.
9 // 9 //
10 // OVERVIEW 10 // OVERVIEW
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 #else 770 #else
771 uint64 sixteen_bytes[2] = { base::RandUint64(), base::RandUint64() }; 771 uint64 sixteen_bytes[2] = { base::RandUint64(), base::RandUint64() };
772 return RandomBytesToGUIDString(sixteen_bytes); 772 return RandomBytesToGUIDString(sixteen_bytes);
773 #endif 773 #endif
774 } 774 }
775 775
776 #if defined(OS_POSIX) 776 #if defined(OS_POSIX)
777 // TODO(cmasone): Once we're comfortable this works, migrate Windows code to 777 // TODO(cmasone): Once we're comfortable this works, migrate Windows code to
778 // use this as well. 778 // use this as well.
779 std::string MetricsService::RandomBytesToGUIDString(const uint64 bytes[2]) { 779 std::string MetricsService::RandomBytesToGUIDString(const uint64 bytes[2]) {
780 return StringPrintf("%08llX-%04llX-%04llX-%04llX-%012llX", 780 return StringPrintf("%08X-%04X-%04X-%04X-%012llX",
781 bytes[0] >> 32, 781 static_cast<unsigned int>(bytes[0] >> 32),
782 (bytes[0] >> 16) & 0x0000ffff, 782 static_cast<unsigned int>((bytes[0] >> 16) & 0x0000ffff),
783 bytes[0] & 0x0000ffff, 783 static_cast<unsigned int>(bytes[0] & 0x0000ffff),
784 bytes[1] >> 48, 784 static_cast<unsigned int>(bytes[1] >> 48),
785 bytes[1] & 0x0000ffffffffffffULL); 785 bytes[1] & 0x0000ffffffffffffULL);
786 } 786 }
787 #endif 787 #endif
788 788
789 //------------------------------------------------------------------------------ 789 //------------------------------------------------------------------------------
790 // State save methods 790 // State save methods
791 791
792 void MetricsService::ScheduleNextStateSave() { 792 void MetricsService::ScheduleNextStateSave() {
793 state_saver_factory_.RevokeAll(); 793 state_saver_factory_.RevokeAll();
794 794
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 thread_id = PlatformThread::CurrentId(); 1925 thread_id = PlatformThread::CurrentId();
1926 return PlatformThread::CurrentId() == thread_id; 1926 return PlatformThread::CurrentId() == thread_id;
1927 } 1927 }
1928 1928
1929 #if defined(OS_CHROMEOS) 1929 #if defined(OS_CHROMEOS)
1930 void MetricsService::StartExternalMetrics(Profile* profile) { 1930 void MetricsService::StartExternalMetrics(Profile* profile) {
1931 external_metrics_ = new chromeos::ExternalMetrics; 1931 external_metrics_ = new chromeos::ExternalMetrics;
1932 external_metrics_->Start(profile); 1932 external_metrics_->Start(profile);
1933 } 1933 }
1934 #endif 1934 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698