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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend_v1/api_util.cc

Issue 384543004: Get rid of DriveEntryKind. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed some temporary variables and IsHostedDocumentByFileExtension(). Created 6 years, 5 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 | Annotate | Revision Log
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/sync_file_system/drive_backend_v1/api_util.h" 5 #include "chrome/browser/sync_file_system/drive_backend_v1/api_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 base::Bind(&APIUtil::DidCreateDirectory, 342 base::Bind(&APIUtil::DidCreateDirectory,
343 AsWeakPtr(), 343 AsWeakPtr(),
344 parent_resource_id, 344 parent_resource_id,
345 title, 345 title,
346 callback)); 346 callback));
347 return; 347 return;
348 } 348 }
349 DVLOG(2) << "Found Drive directory."; 349 DVLOG(2) << "Found Drive directory.";
350 350
351 // TODO(tzik): Handle error. 351 // TODO(tzik): Handle error.
352 DCHECK_EQ(google_apis::ENTRY_KIND_FOLDER, entry->kind()); 352 DCHECK_EQ(google_apis::ResourceEntry::ENTRY_KIND_FOLDER, entry->kind());
353 DCHECK_EQ(directory_name, entry->title()); 353 DCHECK_EQ(directory_name, entry->title());
354 354
355 if (entry->title() == GetSyncRootDirectoryName()) 355 if (entry->title() == GetSyncRootDirectoryName())
356 EnsureSyncRootIsNotInMyDrive(entry->resource_id()); 356 EnsureSyncRootIsNotInMyDrive(entry->resource_id());
357 357
358 callback.Run(error, entry->resource_id()); 358 callback.Run(error, entry->resource_id());
359 } 359 }
360 360
361 void APIUtil::DidCreateDirectory(const std::string& parent_resource_id, 361 void APIUtil::DidCreateDirectory(const std::string& parent_resource_id,
362 const std::string& title, 362 const std::string& title,
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 } 1143 }
1144 1144
1145 std::string APIUtil::GetRootResourceId() const { 1145 std::string APIUtil::GetRootResourceId() const {
1146 if (IsDriveAPIDisabled()) 1146 if (IsDriveAPIDisabled())
1147 return drive_service_->GetRootResourceId(); 1147 return drive_service_->GetRootResourceId();
1148 return root_resource_id_; 1148 return root_resource_id_;
1149 } 1149 }
1150 1150
1151 } // namespace drive_backend 1151 } // namespace drive_backend
1152 } // namespace sync_file_system 1152 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698