OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #include "chrome/browser/dom_ui/downloads_ui.h" | 5 #include "chrome/browser/dom_ui/downloads_ui.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 } // namespace | 112 } // namespace |
113 | 113 |
114 /////////////////////////////////////////////////////////////////////////////// | 114 /////////////////////////////////////////////////////////////////////////////// |
115 // | 115 // |
116 // DownloadsUI | 116 // DownloadsUI |
117 // | 117 // |
118 /////////////////////////////////////////////////////////////////////////////// | 118 /////////////////////////////////////////////////////////////////////////////// |
119 | 119 |
120 DownloadsUI::DownloadsUI(TabContents* contents) : DOMUI(contents) { | 120 DownloadsUI::DownloadsUI(TabContents* contents) : DOMUI(contents) { |
121 DownloadManager* dlm = GetProfile()->GetDownloadManager(); | 121 DownloadManager* dlm = GetProfile()->GetOriginalProfile()-> |
| 122 GetDownloadManager(); |
122 | 123 |
123 DownloadsDOMHandler* handler = new DownloadsDOMHandler(this, dlm); | 124 DownloadsDOMHandler* handler = new DownloadsDOMHandler(this, dlm); |
124 AddMessageHandler(handler); | 125 AddMessageHandler(handler); |
125 handler->Init(); | 126 handler->Init(); |
126 | 127 |
127 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); | 128 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); |
128 | 129 |
129 // Set up the chrome://downloads/ source. | 130 // Set up the chrome://downloads/ source. |
130 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 131 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
131 NewRunnableMethod(&chrome_url_data_manager, | 132 NewRunnableMethod(&chrome_url_data_manager, |
132 &ChromeURLDataManager::AddDataSource, | 133 &ChromeURLDataManager::AddDataSource, |
133 html_source)); | 134 html_source)); |
134 } | 135 } |
OLD | NEW |