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

Side by Side Diff: ios/web_view/internal/translate/web_view_translate_ranker_factory.h

Issue 2973173002: Fix crashes when using translate in incognito by overriding some methods. (Closed)
Patch Set: addressed ichikawa comments Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 IOS_WEB_VIEW_INTERNAL_TRANSLATE_WEB_VIEW_TRANSLATE_RANKER_FACTORY_H_ 5 #ifndef IOS_WEB_VIEW_INTERNAL_TRANSLATE_WEB_VIEW_TRANSLATE_RANKER_FACTORY_H_
6 #define IOS_WEB_VIEW_INTERNAL_TRANSLATE_WEB_VIEW_TRANSLATE_RANKER_FACTORY_H_ 6 #define IOS_WEB_VIEW_INTERNAL_TRANSLATE_WEB_VIEW_TRANSLATE_RANKER_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" 10 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
(...skipping 21 matching lines...) Expand all
32 32
33 private: 33 private:
34 friend struct base::DefaultSingletonTraits<WebViewTranslateRankerFactory>; 34 friend struct base::DefaultSingletonTraits<WebViewTranslateRankerFactory>;
35 35
36 WebViewTranslateRankerFactory(); 36 WebViewTranslateRankerFactory();
37 ~WebViewTranslateRankerFactory() override; 37 ~WebViewTranslateRankerFactory() override;
38 38
39 // BrowserStateKeyedServiceFactory implementation. 39 // BrowserStateKeyedServiceFactory implementation.
40 std::unique_ptr<KeyedService> BuildServiceInstanceFor( 40 std::unique_ptr<KeyedService> BuildServiceInstanceFor(
41 web::BrowserState* context) const override; 41 web::BrowserState* context) const override;
42 web::BrowserState* GetBrowserStateToUse(
43 web::BrowserState* context) const override;
42 44
43 DISALLOW_COPY_AND_ASSIGN(WebViewTranslateRankerFactory); 45 DISALLOW_COPY_AND_ASSIGN(WebViewTranslateRankerFactory);
44 }; 46 };
45 47
46 } // namespace ios_web_view 48 } // namespace ios_web_view
47 49
48 #endif // IOS_WEB_VIEW_INTERNAL_TRANSLATE_WEB_VIEW_TRANSLATE_RANKER_FACTORY_H_ 50 #endif // IOS_WEB_VIEW_INTERNAL_TRANSLATE_WEB_VIEW_TRANSLATE_RANKER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698