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

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 657333002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/ui/app_list/app_list_syncable_service.h" 5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chrome/browser/apps/drive/drive_app_provider.h" 9 #include "chrome/browser/apps/drive/drive_app_provider.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 GetDriveAppIdFromSyncId(item_id)); 912 GetDriveAppIdFromSyncId(item_id));
913 } 913 }
914 } 914 }
915 } 915 }
916 916
917 std::string AppListSyncableService::FindOrCreateOemFolder() { 917 std::string AppListSyncableService::FindOrCreateOemFolder() {
918 AppListFolderItem* oem_folder = model_->FindFolderItem(kOemFolderId); 918 AppListFolderItem* oem_folder = model_->FindFolderItem(kOemFolderId);
919 if (!oem_folder) { 919 if (!oem_folder) {
920 scoped_ptr<AppListFolderItem> new_folder(new AppListFolderItem( 920 scoped_ptr<AppListFolderItem> new_folder(new AppListFolderItem(
921 kOemFolderId, AppListFolderItem::FOLDER_TYPE_OEM)); 921 kOemFolderId, AppListFolderItem::FOLDER_TYPE_OEM));
922 oem_folder = static_cast<AppListFolderItem*>( 922 oem_folder =
923 model_->AddItem(new_folder.PassAs<app_list::AppListItem>())); 923 static_cast<AppListFolderItem*>(model_->AddItem(new_folder.Pass()));
924 SyncItem* oem_sync_item = FindSyncItem(kOemFolderId); 924 SyncItem* oem_sync_item = FindSyncItem(kOemFolderId);
925 if (oem_sync_item) { 925 if (oem_sync_item) {
926 VLOG(1) << "Creating OEM folder from existing sync item: " 926 VLOG(1) << "Creating OEM folder from existing sync item: "
927 << oem_sync_item->item_ordinal.ToDebugString(); 927 << oem_sync_item->item_ordinal.ToDebugString();
928 model_->SetItemPosition(oem_folder, oem_sync_item->item_ordinal); 928 model_->SetItemPosition(oem_folder, oem_sync_item->item_ordinal);
929 } else { 929 } else {
930 model_->SetItemPosition(oem_folder, GetOemFolderPos()); 930 model_->SetItemPosition(oem_folder, GetOemFolderPos());
931 // Do not create a sync item for the OEM folder here, do it in 931 // Do not create a sync item for the OEM folder here, do it in
932 // ResolveFolderPositions() when the item position is finalized. 932 // ResolveFolderPositions() when the item position is finalized.
933 } 933 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 } else { 992 } else {
993 res += " { " + item_name + " }"; 993 res += " { " + item_name + " }";
994 res += " [" + item_ordinal.ToDebugString() + "]"; 994 res += " [" + item_ordinal.ToDebugString() + "]";
995 if (!parent_id.empty()) 995 if (!parent_id.empty())
996 res += " <" + parent_id.substr(0, 8) + ">"; 996 res += " <" + parent_id.substr(0, 8) + ">";
997 } 997 }
998 return res; 998 return res;
999 } 999 }
1000 1000
1001 } // namespace app_list 1001 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/translate_infobar.cc ('k') | chrome/browser/ui/app_list/extension_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698