| OLD | NEW |
| 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 Loading... |
| 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(); | |
| 338 case PREF_READ_ERROR_MAX_ENUM: | 333 case PREF_READ_ERROR_MAX_ENUM: |
| 339 NOTREACHED(); | 334 NOTREACHED(); |
| 340 break; | 335 break; |
| 341 } | 336 } |
| 342 } | 337 } |
| 343 | 338 |
| 344 if (pref_filter_) { | 339 if (pref_filter_) { |
| 345 filtering_in_progress_ = true; | 340 filtering_in_progress_ = true; |
| 346 const PrefFilter::PostFilterOnLoadCallback post_filter_on_load_callback( | 341 const PrefFilter::PostFilterOnLoadCallback post_filter_on_load_callback( |
| 347 base::Bind( | 342 base::Bind( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 382 |
| 388 if (error_delegate_ && read_error_ != PREF_READ_ERROR_NONE) | 383 if (error_delegate_ && read_error_ != PREF_READ_ERROR_NONE) |
| 389 error_delegate_->OnError(read_error_); | 384 error_delegate_->OnError(read_error_); |
| 390 | 385 |
| 391 FOR_EACH_OBSERVER(PrefStore::Observer, | 386 FOR_EACH_OBSERVER(PrefStore::Observer, |
| 392 observers_, | 387 observers_, |
| 393 OnInitializationCompleted(true)); | 388 OnInitializationCompleted(true)); |
| 394 | 389 |
| 395 return; | 390 return; |
| 396 } | 391 } |
| OLD | NEW |