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

Side by Side Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 572873002: Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build break fixed Created 6 years, 3 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/chromeos/policy/device_status_collector.h" 5 #include "chrome/browser/chromeos/policy/device_status_collector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 chromeos::system::StatisticsProvider* provider, 81 chromeos::system::StatisticsProvider* provider,
82 LocationUpdateRequester* location_update_requester) 82 LocationUpdateRequester* location_update_requester)
83 : max_stored_past_activity_days_(kMaxStoredPastActivityDays), 83 : max_stored_past_activity_days_(kMaxStoredPastActivityDays),
84 max_stored_future_activity_days_(kMaxStoredFutureActivityDays), 84 max_stored_future_activity_days_(kMaxStoredFutureActivityDays),
85 local_state_(local_state), 85 local_state_(local_state),
86 last_idle_check_(Time()), 86 last_idle_check_(Time()),
87 last_reported_day_(0), 87 last_reported_day_(0),
88 duration_for_last_reported_day_(0), 88 duration_for_last_reported_day_(0),
89 geolocation_update_in_progress_(false), 89 geolocation_update_in_progress_(false),
90 statistics_provider_(provider), 90 statistics_provider_(provider),
91 weak_factory_(this),
92 report_version_info_(false), 91 report_version_info_(false),
93 report_activity_times_(false), 92 report_activity_times_(false),
94 report_boot_mode_(false), 93 report_boot_mode_(false),
95 report_location_(false), 94 report_location_(false),
96 report_network_interfaces_(false), 95 report_network_interfaces_(false),
97 report_users_(false) { 96 report_users_(false),
97 weak_factory_(this) {
98 if (location_update_requester) 98 if (location_update_requester)
99 location_update_requester_ = *location_update_requester; 99 location_update_requester_ = *location_update_requester;
100 idle_poll_timer_.Start(FROM_HERE, 100 idle_poll_timer_.Start(FROM_HERE,
101 TimeDelta::FromSeconds(kIdlePollIntervalSeconds), 101 TimeDelta::FromSeconds(kIdlePollIntervalSeconds),
102 this, &DeviceStatusCollector::CheckIdleState); 102 this, &DeviceStatusCollector::CheckIdleState);
103 103
104 cros_settings_ = chromeos::CrosSettings::Get(); 104 cros_settings_ = chromeos::CrosSettings::Get();
105 105
106 // Watch for changes to the individual policies that control what the status 106 // Watch for changes to the individual policies that control what the status
107 // reports contain. 107 // reports contain.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 location.SetDouble(kSpeed, position.speed); 549 location.SetDouble(kSpeed, position.speed);
550 location.SetString(kTimestamp, 550 location.SetString(kTimestamp,
551 base::Int64ToString(position.timestamp.ToInternalValue())); 551 base::Int64ToString(position.timestamp.ToInternalValue()));
552 local_state_->Set(prefs::kDeviceLocation, location); 552 local_state_->Set(prefs::kDeviceLocation, location);
553 } 553 }
554 554
555 ScheduleGeolocationUpdateRequest(); 555 ScheduleGeolocationUpdateRequest();
556 } 556 }
557 557
558 } // namespace policy 558 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698