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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc

Issue 1829783002: [Extensions] Convert APIs to use movable types [5] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/chromeos/extensions/file_manager/private_api_drive.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 580
581 void FileManagerPrivateInternalGetEntryPropertiesFunction:: 581 void FileManagerPrivateInternalGetEntryPropertiesFunction::
582 CompleteGetEntryProperties(size_t index, 582 CompleteGetEntryProperties(size_t index,
583 const storage::FileSystemURL& url, 583 const storage::FileSystemURL& url,
584 scoped_ptr<EntryProperties> properties, 584 scoped_ptr<EntryProperties> properties,
585 base::File::Error error) { 585 base::File::Error error) {
586 DCHECK_CURRENTLY_ON(BrowserThread::UI); 586 DCHECK_CURRENTLY_ON(BrowserThread::UI);
587 DCHECK(0 <= processed_count_ && processed_count_ < properties_list_.size()); 587 DCHECK(0 <= processed_count_ && processed_count_ < properties_list_.size());
588 588
589 properties_list_[index] = make_linked_ptr(properties.release());
590 if (error == base::File::FILE_OK) { 589 if (error == base::File::FILE_OK) {
591 properties_list_[index]->external_file_url.reset( 590 properties->external_file_url.reset(
592 new std::string(chromeos::FileSystemURLToExternalFileURL(url).spec())); 591 new std::string(chromeos::FileSystemURLToExternalFileURL(url).spec()));
593 } 592 }
593 properties_list_[index] = std::move(*properties);
594 594
595 processed_count_++; 595 processed_count_++;
596 if (processed_count_ < properties_list_.size()) 596 if (processed_count_ < properties_list_.size())
597 return; 597 return;
598 598
599 results_ = extensions::api::file_manager_private_internal:: 599 results_ = extensions::api::file_manager_private_internal::
600 GetEntryProperties::Results::Create(properties_list_); 600 GetEntryProperties::Results::Create(properties_list_);
601 SendResponse(true); 601 SendResponse(true);
602 } 602 }
603 603
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 } 1135 }
1136 1136
1137 const std::string url = 1137 const std::string url =
1138 download_url_.Resolve("?access_token=" + access_token).spec(); 1138 download_url_.Resolve("?access_token=" + access_token).spec();
1139 SetResult(new base::StringValue(url)); 1139 SetResult(new base::StringValue(url));
1140 1140
1141 SendResponse(true); 1141 SendResponse(true);
1142 } 1142 }
1143 1143
1144 } // namespace extensions 1144 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698