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

Side by Side Diff: chrome/browser/ui/webui/quota_internals/quota_internals_types.cc

Issue 1102353009: WIP Durable storage, chrome side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 7 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
« no previous file with comments | « no previous file | content/browser/quota_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/quota_internals/quota_internals_types.h" 5 #include "chrome/browser/ui/webui/quota_internals/quota_internals_types.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
11 11
12 namespace { 12 namespace {
13 13
14 std::string StorageTypeToString(storage::StorageType type) { 14 std::string StorageTypeToString(storage::StorageType type) {
15 switch (type) { 15 switch (type) {
16 case storage::kStorageTypeTemporary: 16 case storage::kStorageTypeTemporary:
17 return "temporary"; 17 return "temporary";
18 case storage::kStorageTypePersistent: 18 case storage::kStorageTypePersistent:
19 return "persistent"; 19 return "persistent";
20 case storage::kStorageTypeSyncable: 20 case storage::kStorageTypeSyncable:
21 return "syncable"; 21 return "syncable";
22 case storage::kStorageTypeQuotaNotManaged: 22 case storage::kStorageTypeQuotaNotManaged:
23 return "quota not managed"; 23 return "quota not managed";
24 case storage::kStorageTypeUnknown: 24 case storage::kStorageTypeUnknown:
25 return "unknown"; 25 return "unknown";
26 case storage::kStorageTypeDurable:
27 NOTREACHED();
28 return "durable";
26 } 29 }
27 return "unknown"; 30 return "unknown";
28 } 31 }
29 32
30 } // anonymous namespace 33 } // anonymous namespace
31 34
32 namespace quota_internals { 35 namespace quota_internals {
33 36
34 GlobalStorageInfo::GlobalStorageInfo(storage::StorageType type) 37 GlobalStorageInfo::GlobalStorageInfo(storage::StorageType type)
35 : type_(type), usage_(-1), unlimited_usage_(-1), quota_(-1) { 38 : type_(type), usage_(-1), unlimited_usage_(-1), quota_(-1) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (!last_access_time_.is_null()) 98 if (!last_access_time_.is_null())
96 dict->SetDouble("lastAccessTime", last_access_time_.ToDoubleT() * 1000.0); 99 dict->SetDouble("lastAccessTime", last_access_time_.ToDoubleT() * 1000.0);
97 if (!last_modified_time_.is_null()) { 100 if (!last_modified_time_.is_null()) {
98 dict->SetDouble("lastModifiedTime", 101 dict->SetDouble("lastModifiedTime",
99 last_modified_time_.ToDoubleT() * 1000.0); 102 last_modified_time_.ToDoubleT() * 1000.0);
100 } 103 }
101 return dict; 104 return dict;
102 } 105 }
103 106
104 } // namespace quota_internals 107 } // namespace quota_internals
OLDNEW
« no previous file with comments | « no previous file | content/browser/quota_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698