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

Side by Side Diff: chrome/browser/extensions/api/system_storage/storage_info_provider.cc

Issue 18578008: [SystemInfo API] Move Storage API out of experimental namespace and rename to the "system" namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix PermissionTest unittest. Created 7 years, 4 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
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 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r.h" 5 #include "chrome/browser/extensions/api/system_storage/storage_info_provider.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
11 #include "chrome/browser/storage_monitor/storage_monitor.h" 11 #include "chrome/browser/storage_monitor/storage_monitor.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 using content::BrowserThread; 16 using content::BrowserThread;
17 using chrome::StorageMonitor; 17 using chrome::StorageMonitor;
18 using api::experimental_system_info_storage::StorageUnitInfo; 18 using api::system_storage::StorageUnitInfo;
19 using api::experimental_system_info_storage::STORAGE_UNIT_TYPE_FIXED; 19 using api::system_storage::STORAGE_UNIT_TYPE_FIXED;
20 using api::experimental_system_info_storage::STORAGE_UNIT_TYPE_REMOVABLE; 20 using api::system_storage::STORAGE_UNIT_TYPE_REMOVABLE;
21 21
22 namespace systeminfo { 22 namespace systeminfo {
23 23
24 const char kStorageTypeUnknown[] = "unknown"; 24 const char kStorageTypeUnknown[] = "unknown";
25 const char kStorageTypeFixed[] = "fixed"; 25 const char kStorageTypeFixed[] = "fixed";
26 const char kStorageTypeRemovable[] = "removable"; 26 const char kStorageTypeRemovable[] = "removable";
27 27
28 void BuildStorageUnitInfo(const chrome::StorageInfo& info, 28 void BuildStorageUnitInfo(const chrome::StorageInfo& info,
29 StorageUnitInfo* unit) { 29 StorageUnitInfo* unit) {
30 unit->id = StorageInfoProvider::Get()->GetTransientIdForDeviceId( 30 unit->id = StorageInfoProvider::Get()->GetTransientIdForDeviceId(
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 const std::string& transient_id) const { 261 const std::string& transient_id) const {
262 return StorageMonitor::GetInstance()->GetDeviceIdForTransientId(transient_id); 262 return StorageMonitor::GetInstance()->GetDeviceIdForTransientId(transient_id);
263 } 263 }
264 264
265 // static 265 // static
266 StorageInfoProvider* StorageInfoProvider::Get() { 266 StorageInfoProvider* StorageInfoProvider::Get() {
267 return StorageInfoProvider::GetInstance<StorageInfoProvider>(); 267 return StorageInfoProvider::GetInstance<StorageInfoProvider>();
268 } 268 }
269 269
270 } // namespace extensions 270 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698