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

Side by Side Diff: components/safe_browsing_db/v4_local_database_manager.cc

Issue 2648193002: SafeBrowsing: Move enabled_ to base class DB Manager (Closed)
Patch Set: Update comments Created 3 years, 10 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 | « components/safe_browsing_db/v4_local_database_manager.h ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This file should not be build on Android but is currently getting built. 5 // This file should not be build on Android but is currently getting built.
6 // TODO(vakh): Fix that: http://crbug.com/621647 6 // TODO(vakh): Fix that: http://crbug.com/621647
7 7
8 #include "components/safe_browsing_db/v4_local_database_manager.h" 8 #include "components/safe_browsing_db/v4_local_database_manager.h"
9 9
10 #include <vector> 10 #include <vector>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 const base::FilePath& base_path) { 131 const base::FilePath& base_path) {
132 if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) { 132 if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) {
133 return nullptr; 133 return nullptr;
134 } 134 }
135 135
136 return make_scoped_refptr(new V4LocalDatabaseManager(base_path)); 136 return make_scoped_refptr(new V4LocalDatabaseManager(base_path));
137 } 137 }
138 138
139 V4LocalDatabaseManager::V4LocalDatabaseManager(const base::FilePath& base_path) 139 V4LocalDatabaseManager::V4LocalDatabaseManager(const base::FilePath& base_path)
140 : base_path_(base_path), 140 : base_path_(base_path),
141 enabled_(false),
142 list_infos_(GetListInfos()), 141 list_infos_(GetListInfos()),
143 weak_factory_(this) { 142 weak_factory_(this) {
144 DCHECK(!base_path_.empty()); 143 DCHECK(!base_path_.empty());
145 DCHECK(!list_infos_.empty()); 144 DCHECK(!list_infos_.empty());
146 145
147 DVLOG(1) << "V4LocalDatabaseManager::V4LocalDatabaseManager: " 146 DVLOG(1) << "V4LocalDatabaseManager::V4LocalDatabaseManager: "
148 << "base_path_: " << base_path_.AsUTF8Unsafe(); 147 << "base_path_: " << base_path_.AsUTF8Unsafe();
149 } 148 }
150 149
151 V4LocalDatabaseManager::~V4LocalDatabaseManager() { 150 V4LocalDatabaseManager::~V4LocalDatabaseManager() {
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 db_updated_callback_); 722 db_updated_callback_);
724 } 723 }
725 724
726 bool V4LocalDatabaseManager::AreStoresAvailableNow( 725 bool V4LocalDatabaseManager::AreStoresAvailableNow(
727 const StoresToCheck& stores_to_check) const { 726 const StoresToCheck& stores_to_check) const {
728 return enabled_ && v4_database_ && 727 return enabled_ && v4_database_ &&
729 v4_database_->AreStoresAvailable(stores_to_check); 728 v4_database_->AreStoresAvailable(stores_to_check);
730 } 729 }
731 730
732 } // namespace safe_browsing 731 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_local_database_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698