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

Side by Side Diff: extensions/browser/api/storage/storage_api.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/storage/storage_api.h" 5 #include "extensions/browser/api/storage/storage_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 &as_string_list); 210 &as_string_list);
211 bytes_in_use = storage->GetBytesInUse(as_string_list); 211 bytes_in_use = storage->GetBytesInUse(as_string_list);
212 break; 212 break;
213 } 213 }
214 214
215 default: 215 default:
216 return BadMessage(); 216 return BadMessage();
217 } 217 }
218 218
219 return OneArgument( 219 return OneArgument(
220 base::MakeUnique<base::FundamentalValue>(static_cast<int>(bytes_in_use))); 220 base::MakeUnique<base::Value>(static_cast<int>(bytes_in_use)));
221 } 221 }
222 222
223 ExtensionFunction::ResponseValue StorageStorageAreaSetFunction::RunWithStorage( 223 ExtensionFunction::ResponseValue StorageStorageAreaSetFunction::RunWithStorage(
224 ValueStore* storage) { 224 ValueStore* storage) {
225 base::DictionaryValue* input = NULL; 225 base::DictionaryValue* input = NULL;
226 if (!args_->GetDictionary(0, &input)) 226 if (!args_->GetDictionary(0, &input))
227 return BadMessage(); 227 return BadMessage();
228 return UseWriteResult(storage->Set(ValueStore::DEFAULTS, *input)); 228 return UseWriteResult(storage->Set(ValueStore::DEFAULTS, *input));
229 } 229 }
230 230
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 StorageStorageAreaClearFunction::RunWithStorage(ValueStore* storage) { 267 StorageStorageAreaClearFunction::RunWithStorage(ValueStore* storage) {
268 return UseWriteResult(storage->Clear()); 268 return UseWriteResult(storage->Clear());
269 } 269 }
270 270
271 void StorageStorageAreaClearFunction::GetQuotaLimitHeuristics( 271 void StorageStorageAreaClearFunction::GetQuotaLimitHeuristics(
272 QuotaLimitHeuristics* heuristics) const { 272 QuotaLimitHeuristics* heuristics) const {
273 GetModificationQuotaLimitHeuristics(heuristics); 273 GetModificationQuotaLimitHeuristics(heuristics);
274 } 274 }
275 275
276 } // namespace extensions 276 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/storage/settings_quota_unittest.cc ('k') | extensions/browser/api/system_display/system_display_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698