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

Side by Side Diff: chrome/utility/media_galleries/ipc_data_source.cc

Issue 1731483003: chrome: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 #include "chrome/utility/media_galleries/ipc_data_source.h" 5 #include "chrome/utility/media_galleries/ipc_data_source.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" 8 #include "chrome/common/extensions/chrome_utility_extensions_messages.h"
9 #include "content/public/utility/utility_thread.h" 9 #include "content/public/utility/utility_thread.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 OnRequestBlobBytesFinished) 59 OnRequestBlobBytesFinished)
60 IPC_MESSAGE_UNHANDLED(handled = false) 60 IPC_MESSAGE_UNHANDLED(handled = false)
61 IPC_END_MESSAGE_MAP() 61 IPC_END_MESSAGE_MAP()
62 return handled; 62 return handled;
63 } 63 }
64 64
65 IPCDataSource::Request::Request() 65 IPCDataSource::Request::Request()
66 : destination(NULL) { 66 : destination(NULL) {
67 } 67 }
68 68
69 IPCDataSource::Request::Request(const Request& other) = default;
70
69 IPCDataSource::Request::~Request() { 71 IPCDataSource::Request::~Request() {
70 } 72 }
71 73
72 void IPCDataSource::ReadOnUtilityThread(int64_t position, 74 void IPCDataSource::ReadOnUtilityThread(int64_t position,
73 int size, 75 int size,
74 uint8_t* data, 76 uint8_t* data,
75 const DataSource::ReadCB& read_cb) { 77 const DataSource::ReadCB& read_cb) {
76 DCHECK(utility_thread_checker_.CalledOnValidThread()); 78 DCHECK(utility_thread_checker_.CalledOnValidThread());
77 CHECK_GE(total_size_, 0); 79 CHECK_GE(total_size_, 0);
78 CHECK_GE(position, 0); 80 CHECK_GE(position, 0);
(...skipping 23 matching lines...) Expand all
102 if (it == pending_requests_.end()) 104 if (it == pending_requests_.end())
103 return; 105 return;
104 106
105 std::copy(bytes.begin(), bytes.end(), it->second.destination); 107 std::copy(bytes.begin(), bytes.end(), it->second.destination);
106 it->second.callback.Run(bytes.size()); 108 it->second.callback.Run(bytes.size());
107 109
108 pending_requests_.erase(it); 110 pending_requests_.erase(it);
109 } 111 }
110 112
111 } // namespace metadata 113 } // namespace metadata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698