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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_H_
6 #define CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_H_ 6 #define CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // thread to permanently store the data used to make predictions, and keeps 52 // thread to permanently store the data used to make predictions, and keeps
53 // local caches of that data to be able to make predictions synchronously on the 53 // local caches of that data to be able to make predictions synchronously on the
54 // UI thread where it lives. For incognito profiles, there is no table; the 54 // UI thread where it lives. For incognito profiles, there is no table; the
55 // local caches are copied from the main profile at creation and from there on 55 // local caches are copied from the main profile at creation and from there on
56 // are the only thing used. 56 // are the only thing used.
57 // 57 //
58 // This class can be accessed as a weak pointer so that it can safely use 58 // This class can be accessed as a weak pointer so that it can safely use
59 // PostTaskAndReply without fear of crashes if it is destroyed before the reply 59 // PostTaskAndReply without fear of crashes if it is destroyed before the reply
60 // triggers. This is necessary during initialization. 60 // triggers. This is necessary during initialization.
61 class AutocompleteActionPredictor 61 class AutocompleteActionPredictor
62 : public ProfileKeyedService, 62 : public BrowserContextKeyedService,
63 public content::NotificationObserver, 63 public content::NotificationObserver,
64 public base::SupportsWeakPtr<AutocompleteActionPredictor> { 64 public base::SupportsWeakPtr<AutocompleteActionPredictor> {
65 public: 65 public:
66 enum Action { 66 enum Action {
67 ACTION_PRERENDER = 0, 67 ACTION_PRERENDER = 0,
68 ACTION_PRECONNECT, 68 ACTION_PRECONNECT,
69 ACTION_NONE, 69 ACTION_NONE,
70 LAST_PREDICT_ACTION = ACTION_NONE 70 LAST_PREDICT_ACTION = ACTION_NONE
71 }; 71 };
72 72
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 DBIdCacheMap db_id_cache_; 238 DBIdCacheMap db_id_cache_;
239 239
240 bool initialized_; 240 bool initialized_;
241 241
242 DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictor); 242 DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictor);
243 }; 243 };
244 244
245 } // namespace predictors 245 } // namespace predictors
246 246
247 #endif // CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_H_ 247 #endif // CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698