OLD | NEW |
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/media_galleries/media_scan_manager.h" | 5 #include "chrome/browser/media_galleries/media_scan_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 for (ContainerCandidates::const_iterator it = candidates.begin(); | 456 for (ContainerCandidates::const_iterator it = candidates.begin(); |
457 it != candidates.end(); | 457 it != candidates.end(); |
458 ++it) { | 458 ++it) { |
459 if (it->second.is_qualified && it->second.seen_count >= 2) | 459 if (it->second.is_qualified && it->second.seen_count >= 2) |
460 result[it->first] = MediaGalleryScanResult(); | 460 result[it->first] = MediaGalleryScanResult(); |
461 } | 461 } |
462 return result; | 462 return result; |
463 } | 463 } |
464 | 464 |
465 MediaScanManager::ScanObservers::ScanObservers() : observer(NULL) {} | 465 MediaScanManager::ScanObservers::ScanObservers() : observer(NULL) {} |
| 466 MediaScanManager::ScanObservers::ScanObservers(const ScanObservers& other) = |
| 467 default; |
466 MediaScanManager::ScanObservers::~ScanObservers() {} | 468 MediaScanManager::ScanObservers::~ScanObservers() {} |
467 | 469 |
468 void MediaScanManager::OnExtensionUnloaded( | 470 void MediaScanManager::OnExtensionUnloaded( |
469 content::BrowserContext* browser_context, | 471 content::BrowserContext* browser_context, |
470 const extensions::Extension* extension, | 472 const extensions::Extension* extension, |
471 extensions::UnloadedExtensionInfo::Reason reason) { | 473 extensions::UnloadedExtensionInfo::Reason reason) { |
472 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 474 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
473 CancelScan(Profile::FromBrowserContext(browser_context), extension); | 475 CancelScan(Profile::FromBrowserContext(browser_context), extension); |
474 } | 476 } |
475 | 477 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 gallery_count, | 549 gallery_count, |
548 file_counts); | 550 file_counts); |
549 } | 551 } |
550 } | 552 } |
551 scanning_extensions->clear(); | 553 scanning_extensions->clear(); |
552 preferences->SetLastScanCompletionTime(base::Time::Now()); | 554 preferences->SetLastScanCompletionTime(base::Time::Now()); |
553 } | 555 } |
554 scoped_extension_registry_observer_.RemoveAll(); | 556 scoped_extension_registry_observer_.RemoveAll(); |
555 folder_finder_.reset(); | 557 folder_finder_.reset(); |
556 } | 558 } |
OLD | NEW |