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

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

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.h
diff --git a/chrome/browser/media_gallery/transient_device_ids.h b/chrome/browser/media_gallery/transient_device_ids.h
deleted file mode 100644
index cc13a79ee2627d87af0fd5d130d375a725672566..0000000000000000000000000000000000000000
--- a/chrome/browser/media_gallery/transient_device_ids.h
+++ /dev/null
@@ -1,45 +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 keep track of transient IDs for removable devices, so
-// persistent device IDs are not exposed to renderers. Once a removable device
-// gets mapped to a transient ID, the mapping remains valid for the duration of
-// TransientDeviceIds' lifetime.
-
-#ifndef CHROME_BROWSER_MEDIA_GALLERY_TRANSIENT_DEVICE_IDS_H_
-#define CHROME_BROWSER_MEDIA_GALLERY_TRANSIENT_DEVICE_IDS_H_
-
-#include <map>
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/threading/thread_checker.h"
-
-namespace chrome {
-
-class TransientDeviceIds {
- public:
- TransientDeviceIds();
- ~TransientDeviceIds();
-
- // Returns the transient ID for a given |device_id|.
- // |device_id| must be for a removable device.
- // If |device_id| has never been seen before, a new, unique transient id will
- // be assigned.
- uint64 GetTransientIdForDeviceId(const std::string& device_id);
-
- private:
- typedef std::map<std::string, uint64> DeviceIdToTransientIdMap;
-
- DeviceIdToTransientIdMap id_map_;
- uint64 next_transient_id_;
-
- base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(TransientDeviceIds);
-};
-
-} // namespace chrome
-
-#endif // CHROME_BROWSER_MEDIA_GALLERY_TRANSIENT_DEVICE_IDS_H_
« no previous file with comments | « chrome/browser/media_gallery/media_file_system_registry.cc ('k') | chrome/browser/media_gallery/transient_device_ids.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698