OLD | NEW |
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_INTENTS_CWS_INTENTS_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_INTENTS_CWS_INTENTS_REGISTRY_H_ |
6 #define CHROME_BROWSER_INTENTS_CWS_INTENTS_REGISTRY_H_ | 6 #define CHROME_BROWSER_INTENTS_CWS_INTENTS_REGISTRY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 typedef intptr_t URLFetcherHandle; | 66 typedef intptr_t URLFetcherHandle; |
67 | 67 |
68 // Maps URL fetchers to queries. IntentsQuery objects are owned by the map. | 68 // Maps URL fetchers to queries. IntentsQuery objects are owned by the map. |
69 typedef base::hash_map<URLFetcherHandle, IntentsQuery*> QueryMap; | 69 typedef base::hash_map<URLFetcherHandle, IntentsQuery*> QueryMap; |
70 | 70 |
71 // |context| is a profile-dependent URL request context. Must not be NULL. | 71 // |context| is a profile-dependent URL request context. Must not be NULL. |
72 explicit CWSIntentsRegistry(net::URLRequestContextGetter* context); | 72 explicit CWSIntentsRegistry(net::URLRequestContextGetter* context); |
73 virtual ~CWSIntentsRegistry(); | 73 virtual ~CWSIntentsRegistry(); |
74 | 74 |
75 // content::URLFetcherDelegate implementation. | 75 // content::URLFetcherDelegate implementation. |
76 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; | 76 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
77 | 77 |
78 // Map for all in-flight web data requests/intent queries. | 78 // Map for all in-flight web data requests/intent queries. |
79 QueryMap queries_; | 79 QueryMap queries_; |
80 | 80 |
81 // Request context for any CWS requests. | 81 // Request context for any CWS requests. |
82 scoped_refptr<net::URLRequestContextGetter> request_context_; | 82 scoped_refptr<net::URLRequestContextGetter> request_context_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(CWSIntentsRegistry); | 84 DISALLOW_COPY_AND_ASSIGN(CWSIntentsRegistry); |
85 }; | 85 }; |
86 | 86 |
87 #endif // CHROME_BROWSER_INTENTS_CWS_INTENTS_REGISTRY_H_ | 87 #endif // CHROME_BROWSER_INTENTS_CWS_INTENTS_REGISTRY_H_ |
OLD | NEW |