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

Unified Diff: chrome/browser/media_gallery/transient_device_ids.cc

Issue 12208079: Move TransientDeviceId from MediFileSystemRegistry to RemovableStorageNotifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_gallery/transient_device_ids.cc
diff --git a/chrome/browser/media_gallery/transient_device_ids.cc b/chrome/browser/media_gallery/transient_device_ids.cc
deleted file mode 100644
index 30a7eae20a4ee35600137ee4f960402d8070f46c..0000000000000000000000000000000000000000
--- a/chrome/browser/media_gallery/transient_device_ids.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// TransientDeviceIds implementation.
-
-#include "chrome/browser/media_gallery/transient_device_ids.h"
-
-#include "base/logging.h"
-#include "chrome/browser/system_monitor/media_storage_util.h"
-
-namespace chrome {
-
-TransientDeviceIds::TransientDeviceIds() : next_transient_id_(1) {}
-
-TransientDeviceIds::~TransientDeviceIds() {}
-
-uint64 TransientDeviceIds::GetTransientIdForDeviceId(
- const std::string& device_id) {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(MediaStorageUtil::IsRemovableDevice(device_id));
-
- bool inserted =
- id_map_.insert(std::make_pair(device_id, next_transient_id_)).second;
- if (inserted) {
- // Inserted a device that has never been seen before.
- ++next_transient_id_;
- }
- return id_map_[device_id];
-}
-
-} // namespace chrome
« no previous file with comments | « chrome/browser/media_gallery/transient_device_ids.h ('k') | chrome/browser/system_monitor/removable_storage_notifications.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698