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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_private_api.h

Issue 178193030: Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H_
7 7
8 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h" 8 #include "chrome/browser/extensions/chrome_extension_function.h"
10 #include "chrome/common/extensions/api/feedback_private.h" 9 #include "chrome/common/extensions/api/feedback_private.h"
10 #include "extensions/browser/browser_context_keyed_api_factory.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 extern char kFeedbackExtensionId[]; 15 extern char kFeedbackExtensionId[];
16 16
17 class FeedbackService; 17 class FeedbackService;
18 18
19 using extensions::api::feedback_private::SystemInformation; 19 using extensions::api::feedback_private::SystemInformation;
20 20
21 class FeedbackPrivateAPI : public ProfileKeyedAPI { 21 class FeedbackPrivateAPI : public BrowserContextKeyedAPI {
22 public: 22 public:
23 explicit FeedbackPrivateAPI(content::BrowserContext* context); 23 explicit FeedbackPrivateAPI(content::BrowserContext* context);
24 virtual ~FeedbackPrivateAPI(); 24 virtual ~FeedbackPrivateAPI();
25 25
26 FeedbackService* GetService() const; 26 FeedbackService* GetService() const;
27 void RequestFeedback(const std::string& description_template, 27 void RequestFeedback(const std::string& description_template,
28 const std::string& category_tag, 28 const std::string& category_tag,
29 const GURL& page_url); 29 const GURL& page_url);
30 30
31 // ProfileKeyedAPI implementation. 31 // BrowserContextKeyedAPI implementation.
32 static ProfileKeyedAPIFactory<FeedbackPrivateAPI>* GetFactoryInstance(); 32 static BrowserContextKeyedAPIFactory<FeedbackPrivateAPI>*
33 GetFactoryInstance();
33 34
34 private: 35 private:
35 friend class ProfileKeyedAPIFactory<FeedbackPrivateAPI>; 36 friend class BrowserContextKeyedAPIFactory<FeedbackPrivateAPI>;
36 37
37 // ProfileKeyedAPI implementation. 38 // BrowserContextKeyedAPI implementation.
38 static const char* service_name() { 39 static const char* service_name() {
39 return "FeedbackPrivateAPI"; 40 return "FeedbackPrivateAPI";
40 } 41 }
41 42
42 static const bool kServiceHasOwnInstanceInIncognito = true; 43 static const bool kServiceHasOwnInstanceInIncognito = true;
43 44
44 content::BrowserContext* const browser_context_; 45 content::BrowserContext* const browser_context_;
45 FeedbackService* service_; 46 FeedbackService* service_;
46 }; 47 };
47 48
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 virtual ~FeedbackPrivateSendFeedbackFunction() {} 102 virtual ~FeedbackPrivateSendFeedbackFunction() {}
102 virtual bool RunImpl() OVERRIDE; 103 virtual bool RunImpl() OVERRIDE;
103 104
104 private: 105 private:
105 void OnCompleted(bool success); 106 void OnCompleted(bool success);
106 }; 107 };
107 108
108 } // namespace extensions 109 } // namespace extensions
109 110
110 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H _ 111 #endif // CHROME_BROWSER_EXTENSIONS_API_FEEDBACK_PRIVATE_FEEDBACK_PRIVATE_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698