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

Side by Side Diff: google_apis/drive/files_list_request_runner.h

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 GOOGLE_APIS_DRIVE_FILES_LIST_REQUEST_RUNNER_H_ 5 #ifndef GOOGLE_APIS_DRIVE_FILES_LIST_REQUEST_RUNNER_H_
6 #define GOOGLE_APIS_DRIVE_FILES_LIST_REQUEST_RUNNER_H_ 6 #define GOOGLE_APIS_DRIVE_FILES_LIST_REQUEST_RUNNER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "google_apis/drive/drive_api_requests.h" 14 #include "google_apis/drive/drive_api_requests.h"
15 #include "google_apis/drive/drive_api_url_generator.h" 15 #include "google_apis/drive/drive_api_url_generator.h"
16 #include "google_apis/drive/drive_common_callbacks.h" 16 #include "google_apis/drive/drive_common_callbacks.h"
17 17
18 namespace google_apis { 18 namespace google_apis {
19 19
20 class RequestSender; 20 class RequestSender;
21 21
22 // Runs file list requests (the FileListRequest class) with a backoff retry 22 // Runs file list requests (the FileListRequest class) with a backoff retry
(...skipping 24 matching lines...) Expand all
47 47
48 // Called when a single request is completed with either a success or an 48 // Called when a single request is completed with either a success or an
49 // error. In case of DRIVE_RESPONSE_TOO_LARGE it will retry the request with 49 // error. In case of DRIVE_RESPONSE_TOO_LARGE it will retry the request with
50 // half of the requests. 50 // half of the requests.
51 void OnCompleted(int max_results, 51 void OnCompleted(int max_results,
52 const std::string& q, 52 const std::string& q,
53 const std::string& fields, 53 const std::string& fields,
54 const FileListCallback& callback, 54 const FileListCallback& callback,
55 CancelCallback* cancel_callback, 55 CancelCallback* cancel_callback,
56 DriveApiErrorCode error, 56 DriveApiErrorCode error,
57 scoped_ptr<FileList> entry); 57 std::unique_ptr<FileList> entry);
58 58
59 RequestSender* request_sender_; // Not owned. 59 RequestSender* request_sender_; // Not owned.
60 const google_apis::DriveApiUrlGenerator url_generator_; // Not owned. 60 const google_apis::DriveApiUrlGenerator url_generator_; // Not owned.
61 base::Closure request_completed_callback_for_testing_; 61 base::Closure request_completed_callback_for_testing_;
62 62
63 // Note: This should remain the last member so it'll be destroyed and 63 // Note: This should remain the last member so it'll be destroyed and
64 // invalidate its weak pointers before any other members are destroyed. 64 // invalidate its weak pointers before any other members are destroyed.
65 base::WeakPtrFactory<FilesListRequestRunner> weak_ptr_factory_; 65 base::WeakPtrFactory<FilesListRequestRunner> weak_ptr_factory_;
66 DISALLOW_COPY_AND_ASSIGN(FilesListRequestRunner); 66 DISALLOW_COPY_AND_ASSIGN(FilesListRequestRunner);
67 }; 67 };
68 68
69 } // namespace google_apis 69 } // namespace google_apis
70 70
71 #endif // GOOGLE_APIS_DRIVE_FILES_LIST_REQUEST_RUNNER_H_ 71 #endif // GOOGLE_APIS_DRIVE_FILES_LIST_REQUEST_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698