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

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

Issue 2295663002: Replace deprecated ScopedVector<T> in chromeos::TimeZoneProvider (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 <memory> 8 #include <memory>
9 #include <vector>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_vector.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chromeos/timezone/timezone_request.h" 16 #include "chromeos/timezone/timezone_request.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace net { 19 namespace net {
20 class URLRequestContextGetter; 20 class URLRequestContextGetter;
21 } 21 }
22 22
(...skipping 23 matching lines...) Expand all
46 void OnTimezoneResponse(TimeZoneRequest* request, 46 void OnTimezoneResponse(TimeZoneRequest* request,
47 TimeZoneRequest::TimeZoneResponseCallback callback, 47 TimeZoneRequest::TimeZoneResponseCallback callback,
48 std::unique_ptr<TimeZoneResponseData> timezone, 48 std::unique_ptr<TimeZoneResponseData> timezone,
49 bool server_error); 49 bool server_error);
50 50
51 scoped_refptr<net::URLRequestContextGetter> url_context_getter_; 51 scoped_refptr<net::URLRequestContextGetter> url_context_getter_;
52 const GURL url_; 52 const GURL url_;
53 53
54 // Requests in progress. 54 // Requests in progress.
55 // TimeZoneProvider owns all requests, so this vector is deleted on destroy. 55 // TimeZoneProvider owns all requests, so this vector is deleted on destroy.
56 ScopedVector<TimeZoneRequest> requests_; 56 std::vector<std::unique_ptr<TimeZoneRequest>> requests_;
57 57
58 // Creation and destruction should happen on the same thread. 58 // Creation and destruction should happen on the same thread.
59 base::ThreadChecker thread_checker_; 59 base::ThreadChecker thread_checker_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(TimeZoneProvider); 61 DISALLOW_COPY_AND_ASSIGN(TimeZoneProvider);
62 }; 62 };
63 63
64 } // namespace chromeos 64 } // namespace chromeos
65 65
66 #endif // CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_ 66 #endif // CHROMEOS_TIMEZONE_TIMEZONE_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/timezone/timezone_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698