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

Side by Side Diff: chrome/browser/apps/drive/drive_app_provider_browsertest.cc

Issue 640353003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo 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 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/browser/apps/drive/drive_app_provider.h" 5 #include "chrome/browser/apps/drive/drive_app_provider.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 fake_drive_service_.reset(new drive::FakeDriveService); 104 fake_drive_service_.reset(new drive::FakeDriveService);
105 fake_drive_service_->LoadAppListForDriveApi("drive/applist_empty.json"); 105 fake_drive_service_->LoadAppListForDriveApi("drive/applist_empty.json");
106 apps_registry_.reset( 106 apps_registry_.reset(
107 new drive::DriveAppRegistry(fake_drive_service_.get())); 107 new drive::DriveAppRegistry(fake_drive_service_.get()));
108 108
109 fake_uninstall_sync_service_.reset(new FakeUninstallSyncService); 109 fake_uninstall_sync_service_.reset(new FakeUninstallSyncService);
110 110
111 provider_.reset( 111 provider_.reset(
112 new DriveAppProvider(profile(), fake_uninstall_sync_service_.get())); 112 new DriveAppProvider(profile(), fake_uninstall_sync_service_.get()));
113 provider_->SetDriveServiceBridgeForTest( 113 provider_->SetDriveServiceBridgeForTest(
114 make_scoped_ptr(new TestDriveServiceBridge(apps_registry_.get())) 114 make_scoped_ptr(new TestDriveServiceBridge(apps_registry_.get())));
115 .PassAs<DriveServiceBridge>());
116 115
117 // The DriveAppProvider in AppListSyncalbeService interferes with the 116 // The DriveAppProvider in AppListSyncalbeService interferes with the
118 // test. So resets it. 117 // test. So resets it.
119 app_list::AppListSyncableServiceFactory::GetForProfile(profile()) 118 app_list::AppListSyncableServiceFactory::GetForProfile(profile())
120 ->ResetDriveAppProviderForTest(); 119 ->ResetDriveAppProviderForTest();
121 } 120 }
122 121
123 virtual void TearDownOnMainThread() override { 122 virtual void TearDownOnMainThread() override {
124 provider_.reset(); 123 provider_.reset();
125 apps_registry_.reset(); 124 apps_registry_.reset();
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 chrome_app_id, ExtensionRegistry::EVERYTHING)); 578 chrome_app_id, ExtensionRegistry::EVERYTHING));
580 579
581 // Uninstall is removed from sync and the app is added again. 580 // Uninstall is removed from sync and the app is added again.
582 provider()->RemoveUninstalledDriveAppFromSync(kDriveAppId); 581 provider()->RemoveUninstalledDriveAppFromSync(kDriveAppId);
583 WaitForPendingDriveAppConverters(); 582 WaitForPendingDriveAppConverters();
584 chrome_app_id = mapping()->GetChromeApp(kDriveAppId); 583 chrome_app_id = mapping()->GetChromeApp(kDriveAppId);
585 EXPECT_FALSE(chrome_app_id.empty()); 584 EXPECT_FALSE(chrome_app_id.empty());
586 EXPECT_TRUE(ExtensionRegistry::Get(profile())->GetExtensionById( 585 EXPECT_TRUE(ExtensionRegistry::Get(profile())->GetExtensionById(
587 chrome_app_id, ExtensionRegistry::EVERYTHING)); 586 chrome_app_id, ExtensionRegistry::EVERYTHING));
588 } 587 }
OLDNEW
« no previous file with comments | « chrome/browser/android/dev_tools_server.cc ('k') | chrome/browser/apps/drive/drive_service_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698