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

Side by Side Diff: ios/chrome/browser/translate/translate_service_ios.h

Issue 826803003: Cleanup in ios/chrome and ios/public/test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 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
« no previous file with comments | « no previous file | ios/ios_tests.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_ 5 #ifndef IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_
6 #define IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_ 6 #define IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_
7 7
8 #include "base/macros.h"
8 #include "components/web_resource/resource_request_allowed_notifier.h" 9 #include "components/web_resource/resource_request_allowed_notifier.h"
9 10
10 class GURL; 11 class GURL;
11 12
12 // Singleton managing the resources required for Translate. 13 // Singleton managing the resources required for Translate.
13 class TranslateServiceIOS 14 class TranslateServiceIOS
14 : public web_resource::ResourceRequestAllowedNotifier::Observer { 15 : public web_resource::ResourceRequestAllowedNotifier::Observer {
15 public: 16 public:
16 // Must be called before the Translate feature can be used. 17 // Must be called before the Translate feature can be used.
17 static void Initialize(); 18 static void Initialize();
18 19
19 // Must be called to shut down the Translate feature. 20 // Must be called to shut down the Translate feature.
20 static void Shutdown(); 21 static void Shutdown();
21 22
22 // Returns true if the URL can be translated. 23 // Returns true if the URL can be translated.
23 static bool IsTranslatableURL(const GURL& url); 24 static bool IsTranslatableURL(const GURL& url);
24 25
25 private: 26 private:
26 TranslateServiceIOS(); 27 TranslateServiceIOS();
27 ~TranslateServiceIOS(); 28 ~TranslateServiceIOS();
28 29
29 // ResourceRequestAllowedNotifier::Observer methods. 30 // ResourceRequestAllowedNotifier::Observer methods.
30 void OnResourceRequestsAllowed() override; 31 void OnResourceRequestsAllowed() override;
31 32
32 // Helper class to know if it's allowed to make network resource requests. 33 // Helper class to know if it's allowed to make network resource requests.
33 web_resource::ResourceRequestAllowedNotifier 34 web_resource::ResourceRequestAllowedNotifier
34 resource_request_allowed_notifier_; 35 resource_request_allowed_notifier_;
36
37 DISALLOW_COPY_AND_ASSIGN(TranslateServiceIOS);
35 }; 38 };
36 39
37 #endif // IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_ 40 #endif // IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_
OLDNEW
« no previous file with comments | « no previous file | ios/ios_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698