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

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

Issue 140033003: Media galleries preferences also needs to track file counts for scan results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more call site Created 6 years, 11 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 StorageInfo::Type type, 616 StorageInfo::Type type,
617 const std::string& unique_id, 617 const std::string& unique_id,
618 const base::FilePath& path) { 618 const base::FilePath& path) {
619 std::string device_id = StorageInfo::MakeDeviceId(type, unique_id); 619 std::string device_id = StorageInfo::MakeDeviceId(type, unique_id);
620 DCHECK(!StorageInfo::IsMediaDevice(device_id)); 620 DCHECK(!StorageInfo::IsMediaDevice(device_id));
621 621
622 for (size_t i = 0; i < profile_states_.size(); ++i) { 622 for (size_t i = 0; i < profile_states_.size(); ++i) {
623 profile_states_[i]->GetMediaGalleriesPrefs()->AddGallery( 623 profile_states_[i]->GetMediaGalleriesPrefs()->AddGallery(
624 device_id, base::FilePath(), MediaGalleryPrefInfo::kUserAdded, 624 device_id, base::FilePath(), MediaGalleryPrefInfo::kUserAdded,
625 base::string16(), base::string16(), base::string16(), 0, 625 base::string16(), base::string16(), base::string16(), 0,
626 base::Time::Now()); 626 base::Time::Now(), 0, 0, 0);
627 } 627 }
628 return device_id; 628 return device_id;
629 } 629 }
630 630
631 std::string MediaFileSystemRegistryTest::AttachDevice( 631 std::string MediaFileSystemRegistryTest::AttachDevice(
632 StorageInfo::Type type, 632 StorageInfo::Type type,
633 const std::string& unique_id, 633 const std::string& unique_id,
634 const base::FilePath& location) { 634 const base::FilePath& location) {
635 std::string device_id = StorageInfo::MakeDeviceId(type, unique_id); 635 std::string device_id = StorageInfo::MakeDeviceId(type, unique_id);
636 DCHECK(StorageInfo::IsRemovableDevice(device_id)); 636 DCHECK(StorageInfo::IsRemovableDevice(device_id));
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName()); 1052 profile_state->AddNameForAllCompare(path.BaseName().LossyDisplayName());
1053 #else 1053 #else
1054 profile_state->AddNameForAllCompare(path.LossyDisplayName()); 1054 profile_state->AddNameForAllCompare(path.LossyDisplayName());
1055 #endif 1055 #endif
1056 1056
1057 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries); 1057 profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries);
1058 } else { 1058 } else {
1059 profile_state->CheckGalleries("names", one_expectation, one_expectation); 1059 profile_state->CheckGalleries("names", one_expectation, one_expectation);
1060 } 1060 }
1061 } 1061 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698