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

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

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
7 7
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual void DeleteAllData(); 114 virtual void DeleteAllData();
115 115
116 // The maximum length of the string that can be stored in the DB. 116 // The maximum length of the string that can be stored in the DB.
117 static const size_t kMaxStringLength; 117 static const size_t kMaxStringLength;
118 118
119 private: 119 private:
120 friend class PredictorDatabaseInternal; 120 friend class PredictorDatabaseInternal;
121 friend class MockResourcePrefetchPredictorTables; 121 friend class MockResourcePrefetchPredictorTables;
122 122
123 ResourcePrefetchPredictorTables(); 123 ResourcePrefetchPredictorTables();
124 virtual ~ResourcePrefetchPredictorTables(); 124 ~ResourcePrefetchPredictorTables() override;
125 125
126 // Helper functions below help perform functions on the Url and host table 126 // Helper functions below help perform functions on the Url and host table
127 // using the same code. 127 // using the same code.
128 void GetAllDataHelper(PrefetchKeyType key_type, 128 void GetAllDataHelper(PrefetchKeyType key_type,
129 PrefetchDataMap* data_map, 129 PrefetchDataMap* data_map,
130 std::vector<std::string>* to_delete); 130 std::vector<std::string>* to_delete);
131 bool UpdateDataHelper(const PrefetchData& data); 131 bool UpdateDataHelper(const PrefetchData& data);
132 void DeleteDataHelper(PrefetchKeyType key_type, 132 void DeleteDataHelper(PrefetchKeyType key_type,
133 const std::vector<std::string>& keys); 133 const std::vector<std::string>& keys);
134 134
135 // Returns true if the strings in the |data| are less than |kMaxStringLength| 135 // Returns true if the strings in the |data| are less than |kMaxStringLength|
136 // in length. 136 // in length.
137 bool StringsAreSmallerThanDBLimit(const PrefetchData& data) const; 137 bool StringsAreSmallerThanDBLimit(const PrefetchData& data) const;
138 138
139 // PredictorTableBase methods. 139 // PredictorTableBase methods.
140 virtual void CreateTableIfNonExistent() override; 140 void CreateTableIfNonExistent() override;
141 virtual void LogDatabaseStats() override; 141 void LogDatabaseStats() override;
142 142
143 // Helpers to return Statements for cached Statements. The caller must take 143 // Helpers to return Statements for cached Statements. The caller must take
144 // ownership of the return Statements. 144 // ownership of the return Statements.
145 sql::Statement* GetUrlResourceDeleteStatement(); 145 sql::Statement* GetUrlResourceDeleteStatement();
146 sql::Statement* GetUrlResourceUpdateStatement(); 146 sql::Statement* GetUrlResourceUpdateStatement();
147 sql::Statement* GetUrlMetadataDeleteStatement(); 147 sql::Statement* GetUrlMetadataDeleteStatement();
148 sql::Statement* GetUrlMetadataUpdateStatement(); 148 sql::Statement* GetUrlMetadataUpdateStatement();
149 149
150 sql::Statement* GetHostResourceDeleteStatement(); 150 sql::Statement* GetHostResourceDeleteStatement();
151 sql::Statement* GetHostResourceUpdateStatement(); 151 sql::Statement* GetHostResourceUpdateStatement();
152 sql::Statement* GetHostMetadataDeleteStatement(); 152 sql::Statement* GetHostMetadataDeleteStatement();
153 sql::Statement* GetHostMetadataUpdateStatement(); 153 sql::Statement* GetHostMetadataUpdateStatement();
154 154
155 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables); 155 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables);
156 }; 156 };
157 157
158 } // namespace predictors 158 } // namespace predictors
159 159
160 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_ 160 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TABLES_H_
OLDNEW
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h ('k') | chrome/browser/predictors/resource_prefetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698