| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/imported_media_gallery_registry.h" | 5 #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.h" | 10 #include "chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.h" |
| 11 #include "chrome/common/extensions/extension_constants.h" | 11 #include "chrome/common/extensions/extension_constants.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "webkit/fileapi/file_system_task_runners.h" | 13 #include "webkit/browser/fileapi/file_system_task_runners.h" |
| 14 #include "webkit/fileapi/isolated_context.h" | 14 #include "webkit/browser/fileapi/isolated_context.h" |
| 15 | 15 |
| 16 using base::Bind; | 16 using base::Bind; |
| 17 | 17 |
| 18 namespace chrome { | 18 namespace chrome { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 bool CurrentlyOnMediaTaskRunnerThread() { | 22 bool CurrentlyOnMediaTaskRunnerThread() { |
| 23 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 23 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| 24 base::SequencedWorkerPool::SequenceToken media_sequence_token = | 24 base::SequencedWorkerPool::SequenceToken media_sequence_token = |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void ImportedMediaGalleryRegistry::RevokePicasaFileSystem() { | 113 void ImportedMediaGalleryRegistry::RevokePicasaFileSystem() { |
| 114 DCHECK(CurrentlyOnMediaTaskRunnerThread()); | 114 DCHECK(CurrentlyOnMediaTaskRunnerThread()); |
| 115 | 115 |
| 116 if (--picasa_filesystems_count_ == 0) { | 116 if (--picasa_filesystems_count_ == 0) { |
| 117 DCHECK(picasa_data_provider_); | 117 DCHECK(picasa_data_provider_); |
| 118 picasa_data_provider_.reset(NULL); | 118 picasa_data_provider_.reset(NULL); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace chrome | 122 } // namespace chrome |
| OLD | NEW |