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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector.h

Issue 273523007: Dispatch geolocation IPCs on the UI thread. Aside from simplifying the code to avoid a lot of threa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/callback_list.h.pump ('k') | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/device_status_collector.h
===================================================================
--- chrome/browser/chromeos/policy/device_status_collector.h (revision 269778)
+++ chrome/browser/chromeos/policy/device_status_collector.h (working copy)
@@ -8,7 +8,7 @@
#include <string>
#include "base/basictypes.h"
-#include "base/callback_forward.h"
+#include "base/callback_list.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -93,32 +93,6 @@
unsigned int max_stored_future_activity_days_;
private:
- // A helper class to manage receiving geolocation callbacks on the IO
- // thread.
- class Context : public base::RefCountedThreadSafe<Context> {
- public:
- Context();
-
- void GetLocationUpdate(
- const content::GeolocationProvider::LocationUpdateCallback& callback);
-
- private:
- friend class base::RefCountedThreadSafe<Context>;
-
- ~Context();
-
- void GetLocationUpdateInternal();
- void OnLocationUpdate(const content::Geoposition& geoposition);
- void CallCollector(const content::Geoposition& geoposition);
-
- // The callback which this class registers with
- // content::GeolocationProvider.
- content::GeolocationProvider::LocationUpdateCallback our_callback_;
-
- // The callback passed in to GetLocationUpdate.
- content::GeolocationProvider::LocationUpdateCallback owner_callback_;
- };
-
// Prevents the local store of activity periods from growing too large by
// removing entries that are outside the reporting window.
void PruneStoredActivityPeriods(base::Time base_time);
@@ -197,6 +171,9 @@
// way to mock geolocation exists.
LocationUpdateRequester location_update_requester_;
+ scoped_ptr<content::GeolocationProvider::Subscription>
+ geolocation_subscription_;
+
// Cached values of the reporting settings from the device policy.
bool report_version_info_;
bool report_activity_times_;
@@ -205,8 +182,6 @@
bool report_network_interfaces_;
bool report_users_;
- scoped_refptr<Context> context_;
-
scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
version_info_subscription_;
scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
« no previous file with comments | « base/callback_list.h.pump ('k') | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698