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

Unified Diff: chrome/browser/predictors/predictor_database_service.cc

Issue 12225093: chrome/browser/predictors componentization part-1 Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/predictors/predictor_database_service.cc
diff --git a/chrome/browser/predictors/predictor_database_service.cc b/chrome/browser/predictors/predictor_database_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3b545b287a8134715c5fc487b9244ed62727a21d
--- /dev/null
+++ b/chrome/browser/predictors/predictor_database_service.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/predictors/predictor_database_service.h"
+
+#include "base/file_path.h"
+#include "chrome/browser/predictors/resource_prefetch_common.h"
+#include "chrome/browser/profiles/profile.h"
+
+namespace predictors {
+
+PredictorDatabaseService::PredictorDatabaseService(Profile* profile)
+ : profile_(profile) {
+ ResourcePrefetchPredictorConfig config;
+ db_ = new PredictorDatabase(
+ profile->GetPath(),
+ IsSpeculativeResourcePrefetchingEnabled(profile, &config));
+}
+
+PredictorDatabaseService::~PredictorDatabaseService() {
+}
+
+void PredictorDatabaseService::Shutdown() {
+ db_->SetCancelled();
+}
+
+} // namespace predictors
« no previous file with comments | « chrome/browser/predictors/predictor_database_service.h ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698