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

Unified Diff: chrome/browser/feedback/feedback_profile_observer.cc

Issue 185003005: Fix race condition in uploading feedback reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/feedback/feedback_report.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/feedback/feedback_profile_observer.cc
diff --git a/chrome/browser/feedback/feedback_profile_observer.cc b/chrome/browser/feedback/feedback_profile_observer.cc
index 0ec0b7349294fdb97561d55e668d2e69f170dfec..827faa9c9155336f48634a0551f110b46ac62940 100644
--- a/chrome/browser/feedback/feedback_profile_observer.cc
+++ b/chrome/browser/feedback/feedback_profile_observer.cc
@@ -43,7 +43,7 @@ void FeedbackProfileObserver::Observe(
DCHECK_EQ(chrome::NOTIFICATION_PROFILE_CREATED, type);
Profile* profile = content::Source<Profile>(source).ptr();
- if (!profile->IsOffTheRecord())
+ if (profile && !profile->IsOffTheRecord())
QueueUnsentReports(profile);
}
@@ -52,9 +52,10 @@ void FeedbackProfileObserver::QueueUnsentReports(
feedback::FeedbackUploader* uploader =
feedback::FeedbackUploaderFactory::GetForBrowserContext(context);
BrowserThread::PostBlockingPoolTask(FROM_HERE,
- base::Bind(
- &FeedbackReport::LoadReportsAndQueue, context, base::Bind(
- &FeedbackUploader::QueueReport, uploader->AsWeakPtr())));
+ base::Bind(&FeedbackReport::LoadReportsAndQueue,
+ context->GetPath(),
+ base::Bind(&FeedbackUploader::QueueReport,
+ uploader->AsWeakPtr())));
}
} // namespace feedback
« no previous file with comments | « no previous file | chrome/browser/feedback/feedback_report.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698