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

Side by Side Diff: chromeos/timezone/timezone_provider.h

Issue 790793008: chromeos: Remove unused private data members (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « chromeos/dbus/modem_messaging_client.cc ('k') | chromeos/timezone/timezone_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_ 5 #ifndef CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_
6 #define CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_ 6 #define CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 17 matching lines...) Expand all
28 // Note: this should probably be a singleton to monitor requests rate. 28 // Note: this should probably be a singleton to monitor requests rate.
29 // But as it is used only from WizardController, it can be owned by it for now. 29 // But as it is used only from WizardController, it can be owned by it for now.
30 class CHROMEOS_EXPORT TimeZoneProvider { 30 class CHROMEOS_EXPORT TimeZoneProvider {
31 public: 31 public:
32 TimeZoneProvider(net::URLRequestContextGetter* url_context_getter, 32 TimeZoneProvider(net::URLRequestContextGetter* url_context_getter,
33 const GURL& url); 33 const GURL& url);
34 virtual ~TimeZoneProvider(); 34 virtual ~TimeZoneProvider();
35 35
36 // Initiates new request (See TimeZoneRequest for parameters description.) 36 // Initiates new request (See TimeZoneRequest for parameters description.)
37 void RequestTimezone(const Geoposition& position, 37 void RequestTimezone(const Geoposition& position,
38 bool sensor,
39 base::TimeDelta timeout, 38 base::TimeDelta timeout,
40 TimeZoneRequest::TimeZoneResponseCallback callback); 39 TimeZoneRequest::TimeZoneResponseCallback callback);
41 40
42 private: 41 private:
43 friend class TestTimeZoneAPIURLFetcherCallback; 42 friend class TestTimeZoneAPIURLFetcherCallback;
44 43
45 // Deletes request from requests_. 44 // Deletes request from requests_.
46 void OnTimezoneResponse(TimeZoneRequest* request, 45 void OnTimezoneResponse(TimeZoneRequest* request,
47 TimeZoneRequest::TimeZoneResponseCallback callback, 46 TimeZoneRequest::TimeZoneResponseCallback callback,
48 scoped_ptr<TimeZoneResponseData> timezone, 47 scoped_ptr<TimeZoneResponseData> timezone,
49 bool server_error); 48 bool server_error);
50 49
51 scoped_refptr<net::URLRequestContextGetter> url_context_getter_; 50 scoped_refptr<net::URLRequestContextGetter> url_context_getter_;
52 const GURL url_; 51 const GURL url_;
53 52
54 // Requests in progress. 53 // Requests in progress.
55 // TimeZoneProvider owns all requests, so this vector is deleted on destroy. 54 // TimeZoneProvider owns all requests, so this vector is deleted on destroy.
56 ScopedVector<TimeZoneRequest> requests_; 55 ScopedVector<TimeZoneRequest> requests_;
57 56
58 // Creation and destruction should happen on the same thread. 57 // Creation and destruction should happen on the same thread.
59 base::ThreadChecker thread_checker_; 58 base::ThreadChecker thread_checker_;
60 59
61 DISALLOW_COPY_AND_ASSIGN(TimeZoneProvider); 60 DISALLOW_COPY_AND_ASSIGN(TimeZoneProvider);
62 }; 61 };
63 62
64 } // namespace chromeos 63 } // namespace chromeos
65 64
66 #endif // CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_ 65 #endif // CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/modem_messaging_client.cc ('k') | chromeos/timezone/timezone_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698