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

Side by Side Diff: trunk/src/chrome/browser/feedback/feedback_profile_observer.h

Issue 149993002: Revert 247772 "Cache feedback reports to disk in case of send fa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_PROFILE_OBSERVER_H_
6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_PROFILE_OBSERVER_H_
7
8 #include "base/basictypes.h"
9 #include "base/lazy_instance.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
12
13 namespace content {
14 class BrowserContext;
15 }
16
17 namespace feedback {
18
19 // FeedbackProfileObserver waits on profile creation notifications to check
20 // if the profile has any pending feedback reports to upload. If it does, it
21 // queues those reports for upload.
22 class FeedbackProfileObserver : public content::NotificationObserver {
23 public:
24 static void Initialize();
25
26 private:
27 friend struct base::DefaultLazyInstanceTraits<FeedbackProfileObserver>;
28
29 FeedbackProfileObserver();
30 virtual ~FeedbackProfileObserver();
31
32 // content::NotificationObserver override
33 virtual void Observe(int type,
34 const content::NotificationSource& source,
35 const content::NotificationDetails& details) OVERRIDE;
36
37 // Loads any unsent reports from disk and queues them to be uploaded in
38 // the given browser context.
39 void QueueUnsentReports(content::BrowserContext* context);
40
41 // Used to track creation of profiles so we can load any unsent reports
42 // for that profile.
43 content::NotificationRegistrar prefs_registrar_;
44
45 DISALLOW_COPY_AND_ASSIGN(FeedbackProfileObserver);
46 };
47
48 } // namespace feedback
49
50 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_PROFILE_OBSERVER_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/chrome_browser_main.cc ('k') | trunk/src/chrome/browser/feedback/feedback_profile_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698