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

Side by Side Diff: chrome/browser/sync/engine/syncer_thread.cc

Issue 6368094: -Wuninitialized fixes Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sync/engine/syncer_thread.h" 5 #include "chrome/browser/sync/engine/syncer_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 CFTypeRef object = IORegistryEntryCreateCFProperty(hid_service, 853 CFTypeRef object = IORegistryEntryCreateCFProperty(hid_service,
854 CFSTR("HIDIdleTime"), 854 CFSTR("HIDIdleTime"),
855 kCFAllocatorDefault, 855 kCFAllocatorDefault,
856 0); 856 0);
857 if (!object) { 857 if (!object) {
858 LOG(WARNING) << "Could not get IOHIDSystem's HIDIdleTime property"; 858 LOG(WARNING) << "Could not get IOHIDSystem's HIDIdleTime property";
859 IOObjectRelease(hid_service); 859 IOObjectRelease(hid_service);
860 return 0; 860 return 0;
861 } 861 }
862 862
863 int64 idle_time; // in nanoseconds 863 int64 idle_time = 0; // in nanoseconds // clang pr9061 (?)
864 Boolean success = false; 864 Boolean success = false;
865 if (CFGetTypeID(object) == CFNumberGetTypeID()) { 865 if (CFGetTypeID(object) == CFNumberGetTypeID()) {
866 success = CFNumberGetValue((CFNumberRef)object, 866 success = CFNumberGetValue((CFNumberRef)object,
867 kCFNumberSInt64Type, 867 kCFNumberSInt64Type,
868 &idle_time); 868 &idle_time);
869 } else { 869 } else {
870 LOG(WARNING) << "IOHIDSystem's HIDIdleTime property isn't a number!"; 870 LOG(WARNING) << "IOHIDSystem's HIDIdleTime property isn't a number!";
871 } 871 }
872 872
873 CFRelease(object); 873 CFRelease(object);
(...skipping 14 matching lines...) Expand all
888 was_logged = true; 888 was_logged = true;
889 VLOG(1) << "UserIdleTime unimplemented on this platform, synchronization " 889 VLOG(1) << "UserIdleTime unimplemented on this platform, synchronization "
890 "will not throttle when user idle"; 890 "will not throttle when user idle";
891 } 891 }
892 #endif 892 #endif
893 893
894 return 0; 894 return 0;
895 } 895 }
896 896
897 } // namespace browser_sync 897 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertests_misc.cc ('k') | chrome/browser/ui/cocoa/about_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698