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

Side by Side Diff: chrome/browser/prefs/leveldb_pref_store.cc

Issue 310463009: LevelDBPrefStore: Initialize uninitialized member in constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/prefs/leveldb_pref_store.h" 5 #include "chrome/browser/prefs/leveldb_pref_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (error & IO_ERROR) 42 if (error & IO_ERROR)
43 return PersistentPrefStore::PREF_READ_ERROR_LEVELDB_IO; 43 return PersistentPrefStore::PREF_READ_ERROR_LEVELDB_IO;
44 if (error & OPENED) 44 if (error & OPENED)
45 return PersistentPrefStore::PREF_READ_ERROR_LEVELDB_CORRUPTION; 45 return PersistentPrefStore::PREF_READ_ERROR_LEVELDB_CORRUPTION;
46 return PersistentPrefStore::PREF_READ_ERROR_LEVELDB_CORRUPTION_READ_ONLY; 46 return PersistentPrefStore::PREF_READ_ERROR_LEVELDB_CORRUPTION_READ_ONLY;
47 } 47 }
48 48
49 } // namespace 49 } // namespace
50 50
51 struct LevelDBPrefStore::ReadingResults { 51 struct LevelDBPrefStore::ReadingResults {
52 ReadingResults() : error(0) {} 52 ReadingResults() : no_dir(true), error(0) {}
53 bool no_dir; 53 bool no_dir;
54 scoped_ptr<leveldb::DB> db; 54 scoped_ptr<leveldb::DB> db;
55 scoped_ptr<PrefValueMap> value_map; 55 scoped_ptr<PrefValueMap> value_map;
56 int error; 56 int error;
57 }; 57 };
58 58
59 // An instance of this class is created on the UI thread but is used 59 // An instance of this class is created on the UI thread but is used
60 // exclusively on the FILE thread. 60 // exclusively on the FILE thread.
61 class LevelDBPrefStore::FileThreadSerializer { 61 class LevelDBPrefStore::FileThreadSerializer {
62 public: 62 public:
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 411
412 // TODO(dgrogan): Call pref_filter_->FilterOnLoad 412 // TODO(dgrogan): Call pref_filter_->FilterOnLoad
413 413
414 if (error_delegate_.get() && read_error_ != PREF_READ_ERROR_NONE) 414 if (error_delegate_.get() && read_error_ != PREF_READ_ERROR_NONE)
415 error_delegate_->OnError(read_error_); 415 error_delegate_->OnError(read_error_);
416 416
417 FOR_EACH_OBSERVER( 417 FOR_EACH_OBSERVER(
418 PrefStore::Observer, observers_, OnInitializationCompleted(true)); 418 PrefStore::Observer, observers_, OnInitializationCompleted(true));
419 } 419 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698