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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/service_unittest.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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/chromeos/file_system_provider/service.h" 5 #include "chrome/browser/chromeos/file_system_provider/service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 FileSystemProviderServiceTest() : profile_(NULL) {} 184 FileSystemProviderServiceTest() : profile_(NULL) {}
185 185
186 ~FileSystemProviderServiceTest() override {} 186 ~FileSystemProviderServiceTest() override {}
187 187
188 void SetUp() override { 188 void SetUp() override {
189 profile_manager_.reset( 189 profile_manager_.reset(
190 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); 190 new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
191 ASSERT_TRUE(profile_manager_->SetUp()); 191 ASSERT_TRUE(profile_manager_->SetUp());
192 profile_ = profile_manager_->CreateTestingProfile("test-user@example.com"); 192 profile_ = profile_manager_->CreateTestingProfile("test-user@example.com");
193 user_manager_ = new FakeChromeUserManager(); 193 user_manager_ = new FakeChromeUserManager();
194 user_manager_->AddUser(profile_->GetProfileUserName()); 194 user_manager_->AddUser(
195 AccountId::FromUserEmail(profile_->GetProfileUserName()));
195 user_manager_enabler_.reset(new ScopedUserManagerEnabler(user_manager_)); 196 user_manager_enabler_.reset(new ScopedUserManagerEnabler(user_manager_));
196 extension_registry_.reset(new extensions::ExtensionRegistry(profile_)); 197 extension_registry_.reset(new extensions::ExtensionRegistry(profile_));
197 198
198 service_.reset(new Service(profile_, extension_registry_.get())); 199 service_.reset(new Service(profile_, extension_registry_.get()));
199 service_->SetFileSystemFactoryForTesting( 200 service_->SetFileSystemFactoryForTesting(
200 base::Bind(&FakeProvidedFileSystem::Create)); 201 base::Bind(&FakeProvidedFileSystem::Create));
201 extension_ = CreateFakeExtension(kExtensionId); 202 extension_ = CreateFakeExtension(kExtensionId);
202 203
203 registry_ = new FakeRegistry; 204 registry_ = new FakeRegistry;
204 // Passes ownership to the service instance. 205 // Passes ownership to the service instance.
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 EXPECT_EQ(1u, observer.unmounts.size()); 543 EXPECT_EQ(1u, observer.unmounts.size());
543 EXPECT_FALSE(registry_->file_system_info()); 544 EXPECT_FALSE(registry_->file_system_info());
544 EXPECT_FALSE(registry_->watchers()); 545 EXPECT_FALSE(registry_->watchers());
545 } 546 }
546 547
547 service_->RemoveObserver(&observer); 548 service_->RemoveObserver(&observer);
548 } 549 }
549 550
550 } // namespace file_system_provider 551 } // namespace file_system_provider
551 } // namespace chromeos 552 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698