OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_SEARCH_NEW_TAB_PAGE_INTERCEPTOR_SERVICE_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_NEW_TAB_PAGE_INTERCEPTOR_SERVICE_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/ui/search/new_tab_page_interceptor.h" |
| 11 #include "components/keyed_service/core/keyed_service.h" |
| 12 |
| 13 class NewTabPageInterceptor; |
| 14 class Profile; |
| 15 |
| 16 namespace net { |
| 17 class URLRequestInterceptor; |
| 18 } |
| 19 |
| 20 // Owns a NewTabPageInterceptor. |
| 21 class NewTabPageInterceptorService : public KeyedService { |
| 22 public: |
| 23 explicit NewTabPageInterceptorService(Profile* profile); |
| 24 ~NewTabPageInterceptorService() override; |
| 25 |
| 26 void UpdateDefaultSearchProvider(const GURL& new_tab_page_url); |
| 27 |
| 28 scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); |
| 29 |
| 30 private: |
| 31 Profile* profile_; |
| 32 base::WeakPtr<NewTabPageInterceptor> interceptor_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(NewTabPageInterceptorService); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_UI_SEARCH_NEW_TAB_PAGE_INTERCEPTOR_SERVICE_H_ |
OLD | NEW |