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

Side by Side Diff: chrome/browser/predictors/predictor_table_base.h

Issue 10416002: Seculative resource prefetching for URLs CL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resolving conflicts. Created 8 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
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 #ifndef CHROME_BROWSER_PREDICTORS_PREDICTOR_TABLE_BASE_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_PREDICTOR_TABLE_BASE_H_
6 #define CHROME_BROWSER_PREDICTORS_PREDICTOR_TABLE_BASE_H_ 6 #define CHROME_BROWSER_PREDICTORS_PREDICTOR_TABLE_BASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/cancellation_flag.h" 10 #include "base/synchronization/cancellation_flag.h"
(...skipping 11 matching lines...) Expand all
22 class PredictorTableBase 22 class PredictorTableBase
23 : public base::RefCountedThreadSafe<PredictorTableBase> { 23 : public base::RefCountedThreadSafe<PredictorTableBase> {
24 protected: 24 protected:
25 PredictorTableBase(); 25 PredictorTableBase();
26 virtual ~PredictorTableBase(); 26 virtual ~PredictorTableBase();
27 27
28 // DB thread functions. 28 // DB thread functions.
29 virtual void CreateTableIfNonExistent() = 0; 29 virtual void CreateTableIfNonExistent() = 0;
30 virtual void LogDatabaseStats() = 0; 30 virtual void LogDatabaseStats() = 0;
31 void Initialize(sql::Connection* db); 31 void Initialize(sql::Connection* db);
32 void SetCancelled();
32 sql::Connection* DB(); 33 sql::Connection* DB();
33 void ResetDB(); 34 void ResetDB();
34 35
35 bool CantAccessDatabase(); 36 bool CantAccessDatabase();
36 37
38 private:
37 base::CancellationFlag cancelled_; 39 base::CancellationFlag cancelled_;
38 40
39 private:
40 friend class base::RefCountedThreadSafe<PredictorTableBase>; 41 friend class base::RefCountedThreadSafe<PredictorTableBase>;
41 42
42 sql::Connection* db_; 43 sql::Connection* db_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(PredictorTableBase); 45 DISALLOW_COPY_AND_ASSIGN(PredictorTableBase);
45 }; 46 };
46 47
47 } // namespace predictors 48 } // namespace predictors
48 49
49 #endif // CHROME_BROWSER_PREDICTORS_PREDICTOR_TABLE_BASE_H_ 50 #endif // CHROME_BROWSER_PREDICTORS_PREDICTOR_TABLE_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/predictors/predictor_database.cc ('k') | chrome/browser/predictors/predictor_table_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698