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

Side by Side Diff: chrome/browser/media_galleries/media_file_system_registry_unittest.cc

Issue 2318033002: c/browser, c/common, components M-N: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix ItunesFileUtilTest Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // MediaFileSystemRegistry unit tests. 5 // MediaFileSystemRegistry unit tests.
6 6
7 #include "chrome/browser/media_galleries/media_file_system_registry.h" 7 #include "chrome/browser/media_galleries/media_file_system_registry.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 SetRenderProcessHostFactory(&rph_factory_); 770 SetRenderProcessHostFactory(&rph_factory_);
771 771
772 test_file_system_context_ = new TestMediaFileSystemContext( 772 test_file_system_context_ = new TestMediaFileSystemContext(
773 g_browser_process->media_file_system_registry()); 773 g_browser_process->media_file_system_registry());
774 774
775 #if defined(OS_CHROMEOS) 775 #if defined(OS_CHROMEOS)
776 test_user_manager_.reset(new chromeos::ScopedTestUserManager()); 776 test_user_manager_.reset(new chromeos::ScopedTestUserManager());
777 #endif 777 #endif
778 778
779 ASSERT_TRUE(galleries_dir_.CreateUniqueTempDir()); 779 ASSERT_TRUE(galleries_dir_.CreateUniqueTempDir());
780 empty_dir_ = galleries_dir_.path().AppendASCII("empty"); 780 empty_dir_ = galleries_dir_.GetPath().AppendASCII("empty");
781 ASSERT_TRUE(base::CreateDirectory(empty_dir_)); 781 ASSERT_TRUE(base::CreateDirectory(empty_dir_));
782 dcim_dir_ = galleries_dir_.path().AppendASCII("with_dcim"); 782 dcim_dir_ = galleries_dir_.GetPath().AppendASCII("with_dcim");
783 ASSERT_TRUE(base::CreateDirectory(dcim_dir_)); 783 ASSERT_TRUE(base::CreateDirectory(dcim_dir_));
784 ASSERT_TRUE(base::CreateDirectory( 784 ASSERT_TRUE(base::CreateDirectory(
785 dcim_dir_.Append(storage_monitor::kDCIMDirectoryName))); 785 dcim_dir_.Append(storage_monitor::kDCIMDirectoryName)));
786 } 786 }
787 787
788 void MediaFileSystemRegistryTest::TearDown() { 788 void MediaFileSystemRegistryTest::TearDown() {
789 profile_states_.clear(); 789 profile_states_.clear();
790 MediaFileSystemRegistry* registry = 790 MediaFileSystemRegistry* registry =
791 g_browser_process->media_file_system_registry(); 791 g_browser_process->media_file_system_registry();
792 EXPECT_EQ(0U, GetExtensionGalleriesHostCount(registry)); 792 EXPECT_EQ(0U, GetExtensionGalleriesHostCount(registry));
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 fs_info.begin()->second.fsid).empty()); 1071 fs_info.begin()->second.fsid).empty());
1072 1072
1073 // Revoke permission and ensure that the file system is revoked. 1073 // Revoke permission and ensure that the file system is revoked.
1074 SetGalleryPermission(profile_state, 1074 SetGalleryPermission(profile_state,
1075 profile_state->regular_permission_extension(), 1075 profile_state->regular_permission_extension(),
1076 device_id, 1076 device_id,
1077 false /*has access*/); 1077 false /*has access*/);
1078 EXPECT_TRUE(test_file_system_context()->GetRegisteredPath( 1078 EXPECT_TRUE(test_file_system_context()->GetRegisteredPath(
1079 fs_info.begin()->second.fsid).empty()); 1079 fs_info.begin()->second.fsid).empty());
1080 } 1080 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698