const base::FilePath& context_path) {
DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread());
- scoped_ptr<ListValue> info_list(static_cast<IndexedDBContextImpl*>(
- context.get())->GetAllOriginsDetails());
+ IndexedDBContextImpl* context_impl =
+ static_cast<IndexedDBContextImpl*>(context.get());
- BrowserThread::PostTask(BrowserThread::UI,
- FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::OnOriginsReady,
- base::Unretained(this),
- base::Passed(&info_list),
- context_path));
+ scoped_ptr<base::ListValue> info_list(context_impl->GetAllOriginsDetails());
+ bool is_incognito = context_impl->is_incognito();
+
+ BrowserThread::PostTask(
+ BrowserThread::UI,
+ FROM_HERE,
+ base::Bind(&IndexedDBInternalsUI::OnOriginsReady,
+ base::Unretained(this),
+ base::Passed(&info_list),
+ is_incognito ? base::FilePath() : context_path));
}
-void IndexedDBInternalsUI::OnOriginsReady(scoped_ptr<ListValue> origins,
+void IndexedDBInternalsUI::OnOriginsReady(scoped_ptr<base::ListValue> origins,
const base::FilePath& path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
web_ui()->CallJavascriptFunction(
if (!context->IsInOriginSet(origin_url))
return;
- context->ForceClose(origin_url);
+ context->ForceClose(origin_url,
+ IndexedDBContextImpl::FORCE_CLOSE_INTERNALS_PAGE);
size_t connection_count = context->GetConnectionCount(origin_url);
base::ScopedTempDir temp_dir;
if (!context->IsInOriginSet(origin_url))
return;
- context->ForceClose(origin_url);
+ context->ForceClose(origin_url,
+ IndexedDBContextImpl::FORCE_CLOSE_INTERNALS_PAGE);
size_t connection_count = context->GetConnectionCount(origin_url);
BrowserThread::PostTask(BrowserThread::UI,
"indexeddb.onForcedClose",
base::StringValue(partition_path.value()),
base::StringValue(origin_url.spec()),
- base::FundamentalValue(double(connection_count)));
+ base::FundamentalValue(static_cast<double>(connection_count)));
}
void IndexedDBInternalsUI::OnDownloadDataReady(
const GURL referrer(web_ui()->GetWebContents()->GetLastCommittedURL());
dl_params->set_referrer(
- content::Referrer(referrer, WebKit::WebReferrerPolicyDefault));
+ content::Referrer(referrer, blink::WebReferrerPolicyDefault));
// This is how to watch for the download to finish: first wait for it
// to start, then attach a DownloadItem::Observer to observe the
private:
const base::FilePath temp_dir_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileDeleter);
};
void FileDeleter::OnDownloadUpdated(DownloadItem* item) {
const base::FilePath& temp_path,
size_t connection_count,
DownloadItem* item,
- net::Error error) {
+ DownloadInterruptReason interrupt_reason) {
- if (error != net::OK) {
- LOG(ERROR)
- << "Error downloading database dump: " << net::ErrorToString(error);
+ if (interrupt_reason != DOWNLOAD_INTERRUPT_REASON_NONE) {
+ LOG(ERROR) << "Error downloading database dump: "
+ << DownloadInterruptReasonToString(interrupt_reason);
return;
}
"indexeddb.onOriginDownloadReady",
base::StringValue(partition_path.value()),
base::StringValue(origin_url.spec()),
- base::FundamentalValue(double(connection_count)));
+ base::FundamentalValue(static_cast<double>(connection_count)));
}
} // namespace content