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

Unified Diff: chrome/browser/history/in_memory_url_index.cc

Issue 853743002: First pass at fixing guest browser cookies issue. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete the Profile Manager. Guest Profile doesn't write to autocomplete/history. Views still needs … Created 5 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 | « chrome/browser/feedback/show_feedback_page.cc ('k') | chrome/browser/profiles/profile_destroyer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/in_memory_url_index.cc
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index 32fb87c7f92785830f34bd19b6b750c3c2844f26..172b9e0ddd0b346fe42baf0d8a8808e3f8159570 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -122,7 +122,13 @@ void InMemoryURLIndex::ShutDown() {
if (!GetCacheFilePath(&path))
return;
private_data_tracker_.TryCancelAll();
- URLIndexPrivateData::WritePrivateDataToCacheFileTask(private_data_, path);
+
+ // During browser TearDown this method was called from a thread that can
+ // perform FILE ops. Guest Profiles are closed on UI thread, so post a task.
+ if (content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE))
+ URLIndexPrivateData::WritePrivateDataToCacheFileTask(private_data_, path);
+ else
+ PostSaveToCacheFileTask();
needs_to_be_cached_ = false;
}
« no previous file with comments | « chrome/browser/feedback/show_feedback_page.cc ('k') | chrome/browser/profiles/profile_destroyer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698