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

Side by Side Diff: base/prefs/json_pref_store.cc

Issue 169323003: Implementation of leveldb-backed PrefStore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Close the database after each test Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/prefs/persistent_pref_store.h » ('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) 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 "base/prefs/json_pref_store.h" 5 #include "base/prefs/json_pref_store.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 break; 323 break;
324 case PREF_READ_ERROR_JSON_PARSE: 324 case PREF_READ_ERROR_JSON_PARSE:
325 case PREF_READ_ERROR_JSON_REPEAT: 325 case PREF_READ_ERROR_JSON_REPEAT:
326 break; 326 break;
327 case PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE: 327 case PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE:
328 // This is a special error code to be returned by ReadPrefs when it 328 // This is a special error code to be returned by ReadPrefs when it
329 // can't complete synchronously, it should never be returned by the read 329 // can't complete synchronously, it should never be returned by the read
330 // operation itself. 330 // operation itself.
331 NOTREACHED(); 331 NOTREACHED();
332 break; 332 break;
333 case PREF_READ_ERROR_LEVELDB_IO:
334 case PREF_READ_ERROR_LEVELDB_CORRUPTION_READ_ONLY:
335 case PREF_READ_ERROR_LEVELDB_CORRUPTION:
336 // These are specific to LevelDBPrefStore.
337 NOTREACHED();
333 case PREF_READ_ERROR_MAX_ENUM: 338 case PREF_READ_ERROR_MAX_ENUM:
334 NOTREACHED(); 339 NOTREACHED();
335 break; 340 break;
336 } 341 }
337 } 342 }
338 343
339 if (pref_filter_) { 344 if (pref_filter_) {
340 filtering_in_progress_ = true; 345 filtering_in_progress_ = true;
341 const PrefFilter::PostFilterOnLoadCallback post_filter_on_load_callback( 346 const PrefFilter::PostFilterOnLoadCallback post_filter_on_load_callback(
342 base::Bind( 347 base::Bind(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 387
383 if (error_delegate_ && read_error_ != PREF_READ_ERROR_NONE) 388 if (error_delegate_ && read_error_ != PREF_READ_ERROR_NONE)
384 error_delegate_->OnError(read_error_); 389 error_delegate_->OnError(read_error_);
385 390
386 FOR_EACH_OBSERVER(PrefStore::Observer, 391 FOR_EACH_OBSERVER(PrefStore::Observer,
387 observers_, 392 observers_,
388 OnInitializationCompleted(true)); 393 OnInitializationCompleted(true));
389 394
390 return; 395 return;
391 } 396 }
OLDNEW
« no previous file with comments | « no previous file | base/prefs/persistent_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698