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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser_about_handler.h" 5 #include "chrome/browser/browser_about_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
11 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
12 #include "base/file_version_info.h" 12 #include "base/file_version_info.h"
13 #include "base/histogram.h" 13 #include "base/histogram.h"
14 #include "base/i18n/number_formatting.h" 14 #include "base/i18n/number_formatting.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/platform_thread.h" 16 #include "base/platform_thread.h"
17 #include "base/stats_table.h" 17 #include "base/stats_table.h"
18 #include "base/string_piece.h" 18 #include "base/string_piece.h"
19 #include "base/string_util.h" 19 #include "base/string_util.h"
20 #include "base/thread.h" 20 #include "base/thread.h"
21 #include "base/tracked_objects.h" 21 #include "base/tracked_objects.h"
22 #include "chrome/browser/browser.h" 22 #include "chrome/browser/browser.h"
23 #include "chrome/browser/browser_process.h" 23 #include "chrome/browser/browser_process.h"
24 #include "chrome/browser/chrome_thread.h"
24 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 25 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
25 #include "chrome/browser/memory_details.h" 26 #include "chrome/browser/memory_details.h"
26 #include "chrome/browser/net/dns_global.h" 27 #include "chrome/browser/net/dns_global.h"
27 #include "chrome/browser/profile.h" 28 #include "chrome/browser/profile.h"
28 #include "chrome/browser/profile_manager.h" 29 #include "chrome/browser/profile_manager.h"
29 #include "chrome/browser/renderer_host/render_process_host.h" 30 #include "chrome/browser/renderer_host/render_process_host.h"
30 #include "chrome/browser/renderer_host/render_view_host.h" 31 #include "chrome/browser/renderer_host/render_view_host.h"
31 #include "chrome/browser/sync/auth_error_state.h" 32 #include "chrome/browser/sync/auth_error_state.h"
32 #include "chrome/browser/sync/profile_sync_service.h" 33 #include "chrome/browser/sync/profile_sync_service.h"
33 #include "chrome/common/chrome_paths.h" 34 #include "chrome/common/chrome_paths.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 561
561 // AboutSource ----------------------------------------------------------------- 562 // AboutSource -----------------------------------------------------------------
562 563
563 AboutSource::AboutSource() 564 AboutSource::AboutSource()
564 : DataSource(chrome::kAboutScheme, MessageLoop::current()) { 565 : DataSource(chrome::kAboutScheme, MessageLoop::current()) {
565 // This should be a singleton. 566 // This should be a singleton.
566 DCHECK(!about_source); 567 DCHECK(!about_source);
567 about_source = this; 568 about_source = this;
568 569
569 // Add us to the global URL handler on the IO thread. 570 // Add us to the global URL handler on the IO thread.
570 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 571 ChromeThread::PostTask(
571 NewRunnableMethod(Singleton<ChromeURLDataManager>().get(), 572 ChromeThread::IO, FROM_HERE,
573 NewRunnableMethod(
574 Singleton<ChromeURLDataManager>().get(),
572 &ChromeURLDataManager::AddDataSource, this)); 575 &ChromeURLDataManager::AddDataSource, this));
573 } 576 }
574 577
575 AboutSource::~AboutSource() { 578 AboutSource::~AboutSource() {
576 about_source = NULL; 579 about_source = NULL;
577 } 580 }
578 581
579 void AboutSource::StartDataRequest(const std::string& path_raw, 582 void AboutSource::StartDataRequest(const std::string& path_raw,
580 int request_id) { 583 int request_id) {
581 std::string path = path_raw; 584 std::string path = path_raw;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 // Run the dialog. This will re-use the existing one if it's already up. 897 // Run the dialog. This will re-use the existing one if it's already up.
895 AboutIPCDialog::RunDialog(); 898 AboutIPCDialog::RunDialog();
896 return true; 899 return true;
897 } 900 }
898 #endif 901 #endif
899 902
900 #endif // OFFICIAL_BUILD 903 #endif // OFFICIAL_BUILD
901 904
902 return false; 905 return false;
903 } 906 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_table_model_unittest.cc ('k') | chrome/browser/browser_commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698