| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 &value); | 183 &value); |
| 184 } | 184 } |
| 185 | 185 |
| 186 std::string html_data; | 186 std::string html_data; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 base::LazyInstance<LazyDirectoryListerCacher> lazy_dir_lister( | 189 base::LazyInstance<LazyDirectoryListerCacher> lazy_dir_lister( |
| 190 base::LINKER_INITIALIZED); | 190 base::LINKER_INITIALIZED); |
| 191 | 191 |
| 192 // This is called indirectly by the network layer to access resources. | 192 // This is called indirectly by the network layer to access resources. |
| 193 StringPiece NetResourceProvider(int key) { | 193 base::StringPiece NetResourceProvider(int key) { |
| 194 if (IDR_DIR_HEADER_HTML == key) | 194 if (IDR_DIR_HEADER_HTML == key) |
| 195 return StringPiece(lazy_dir_lister.Pointer()->html_data); | 195 return base::StringPiece(lazy_dir_lister.Pointer()->html_data); |
| 196 | 196 |
| 197 return ResourceBundle::GetSharedInstance().GetRawDataResource(key); | 197 return ResourceBundle::GetSharedInstance().GetRawDataResource(key); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void RunUIMessageLoop(BrowserProcess* browser_process) { | 200 void RunUIMessageLoop(BrowserProcess* browser_process) { |
| 201 #if defined(TOOLKIT_VIEWS) | 201 #if defined(TOOLKIT_VIEWS) |
| 202 views::AcceleratorHandler accelerator_handler; | 202 views::AcceleratorHandler accelerator_handler; |
| 203 MessageLoopForUI::current()->Run(&accelerator_handler); | 203 MessageLoopForUI::current()->Run(&accelerator_handler); |
| 204 #elif defined(OS_LINUX) | 204 #elif defined(OS_LINUX) |
| 205 MessageLoopForUI::current()->Run(NULL); | 205 MessageLoopForUI::current()->Run(NULL); |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 if (metrics) | 844 if (metrics) |
| 845 metrics->Stop(); | 845 metrics->Stop(); |
| 846 | 846 |
| 847 // browser_shutdown takes care of deleting browser_process, so we need to | 847 // browser_shutdown takes care of deleting browser_process, so we need to |
| 848 // release it. | 848 // release it. |
| 849 browser_process.release(); | 849 browser_process.release(); |
| 850 browser_shutdown::Shutdown(); | 850 browser_shutdown::Shutdown(); |
| 851 | 851 |
| 852 return result_code; | 852 return result_code; |
| 853 } | 853 } |
| OLD | NEW |