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

Side by Side Diff: chrome/browser/ui/webui/predictors/predictors_handler.h

Issue 117933003: Remove the speculative resource prefetching code. This was experimental code added 1.5 years ago an… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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
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_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/predictors/resource_prefetch_predictor.h"
10 #include "content/public/browser/web_ui_message_handler.h" 9 #include "content/public/browser/web_ui_message_handler.h"
11 10
12 namespace base { 11 namespace base {
13 class ListValue; 12 class ListValue;
14 } 13 }
15 14
16 namespace predictors { 15 namespace predictors {
17 class AutocompleteActionPredictor; 16 class AutocompleteActionPredictor;
18 class ResourcePrefetchPredictor;
19 } 17 }
20 18
21 class Profile; 19 class Profile;
22 20
23 // The handler for Javascript messages for about:predictors. 21 // The handler for Javascript messages for about:predictors.
24 class PredictorsHandler : public content::WebUIMessageHandler { 22 class PredictorsHandler : public content::WebUIMessageHandler {
25 public: 23 public:
26 explicit PredictorsHandler(Profile* profile); 24 explicit PredictorsHandler(Profile* profile);
27 virtual ~PredictorsHandler(); 25 virtual ~PredictorsHandler();
28 26
29 // WebUIMessageHandler implementation. 27 // WebUIMessageHandler implementation.
30 virtual void RegisterMessages() OVERRIDE; 28 virtual void RegisterMessages() OVERRIDE;
31 29
32 private: 30 private:
33 // Synchronously fetches the database from AutocompleteActionPredictor and 31 // Synchronously fetches the database from AutocompleteActionPredictor and
34 // calls into JS with the resulting DictionaryValue. 32 // calls into JS with the resulting DictionaryValue.
35 void RequestAutocompleteActionPredictorDb(const base::ListValue* args); 33 void RequestAutocompleteActionPredictorDb(const base::ListValue* args);
36 34
37 // Fetches stats for the ResourcePrefetchPredictor and returns it as a
38 // DictionaryValue to the JS.
39 void RequestResourcePrefetchPredictorDb(const base::ListValue* args);
40
41 // Helper for RequestResourcePrefetchPredictorDb.
42 void AddPrefetchDataMapToListValue(
43 const predictors::ResourcePrefetchPredictor::PrefetchDataMap& data_map,
44 base::ListValue* db) const;
45
46 predictors::AutocompleteActionPredictor* autocomplete_action_predictor_; 35 predictors::AutocompleteActionPredictor* autocomplete_action_predictor_;
47 predictors::ResourcePrefetchPredictor* resource_prefetch_predictor_;
48 36
49 DISALLOW_COPY_AND_ASSIGN(PredictorsHandler); 37 DISALLOW_COPY_AND_ASSIGN(PredictorsHandler);
50 }; 38 };
51 39
52 #endif // CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_ 40 #endif // CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_contents.cc ('k') | chrome/browser/ui/webui/predictors/predictors_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698