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

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

Issue 505283002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/media_galleries/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « chrome/browser/media_galleries/media_folder_finder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 find_folders_results_ = results; 182 find_folders_results_ = results;
183 } 183 }
184 184
185 void SetExpectedScanResults(int gallery_count, 185 void SetExpectedScanResults(int gallery_count,
186 const MediaGalleryScanResult& file_counts) { 186 const MediaGalleryScanResult& file_counts) {
187 expected_gallery_count_ = gallery_count; 187 expected_gallery_count_ = gallery_count;
188 expected_file_counts_ = file_counts; 188 expected_file_counts_ = file_counts;
189 } 189 }
190 190
191 void StartScan() { 191 void StartScan() {
192 media_scan_manager_->StartScan(profile_.get(), extension_, 192 media_scan_manager_->StartScan(
193 true /* user_gesture */); 193 profile_.get(), extension_.get(), true /* user_gesture */);
194 } 194 }
195 195
196 MediaGalleriesPreferences* gallery_prefs() { 196 MediaGalleriesPreferences* gallery_prefs() {
197 return gallery_prefs_; 197 return gallery_prefs_;
198 } 198 }
199 199
200 const MediaGalleriesPrefInfoMap& known_galleries() const { 200 const MediaGalleriesPrefInfoMap& known_galleries() const {
201 return gallery_prefs_->known_galleries(); 201 return gallery_prefs_->known_galleries();
202 } 202 }
203 203
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 file_counts.audio_count *= kGalleriesAdded; 727 file_counts.audio_count *= kGalleriesAdded;
728 file_counts.image_count *= kGalleriesAdded; 728 file_counts.image_count *= kGalleriesAdded;
729 file_counts.video_count *= kGalleriesAdded; 729 file_counts.video_count *= kGalleriesAdded;
730 SetExpectedScanResults(kGalleriesAdded, file_counts); 730 SetExpectedScanResults(kGalleriesAdded, file_counts);
731 StartScan(); 731 StartScan();
732 732
733 base::RunLoop().RunUntilIdle(); 733 base::RunLoop().RunUntilIdle();
734 EXPECT_EQ(1, FindFolderDestroyCount()); 734 EXPECT_EQ(1, FindFolderDestroyCount());
735 EXPECT_EQ(galleries_before + kGalleriesAdded, gallery_count()); 735 EXPECT_EQ(galleries_before + kGalleriesAdded, gallery_count());
736 } 736 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_folder_finder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698