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

Side by Side Diff: chrome/browser/dom_ui/net_internals_ui.cc

Issue 3007008: Cleanup: Break another common->app dependency. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: minor fix Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/net_internals_ui.h" 5 #include "chrome/browser/dom_ui/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <utility>
10 #include <vector> 11 #include <vector>
11 12
12 #include "app/l10n_util.h" 13 #include "app/l10n_util.h"
13 #include "app/resource_bundle.h" 14 #include "app/resource_bundle.h"
14 #include "base/command_line.h" 15 #include "base/command_line.h"
15 #include "base/file_util.h" 16 #include "base/file_util.h"
16 #include "base/file_version_info.h" 17 #include "base/file_version_info.h"
17 #include "base/message_loop.h" 18 #include "base/message_loop.h"
18 #include "base/path_service.h" 19 #include "base/path_service.h"
19 #include "base/singleton.h" 20 #include "base/singleton.h"
20 #include "base/string_piece.h" 21 #include "base/string_piece.h"
21 #include "base/string_util.h" 22 #include "base/string_util.h"
22 #include "base/utf_string_conversions.h" 23 #include "base/utf_string_conversions.h"
23 #include "base/values.h" 24 #include "base/values.h"
24 #include "chrome/app/chrome_version_info.h"
25 #include "chrome/browser/browser_process.h" 25 #include "chrome/browser/browser_process.h"
26 #include "chrome/browser/chrome_thread.h" 26 #include "chrome/browser/chrome_thread.h"
27 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 27 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
28 #include "chrome/browser/io_thread.h" 28 #include "chrome/browser/io_thread.h"
29 #include "chrome/browser/net/chrome_net_log.h" 29 #include "chrome/browser/net/chrome_net_log.h"
30 #include "chrome/browser/net/connection_tester.h" 30 #include "chrome/browser/net/connection_tester.h"
31 #include "chrome/browser/net/passive_log_collector.h" 31 #include "chrome/browser/net/passive_log_collector.h"
32 #include "chrome/browser/net/url_fixer_upper.h" 32 #include "chrome/browser/net/url_fixer_upper.h"
33 #include "chrome/browser/platform_util.h" 33 #include "chrome/browser/platform_util.h"
34 #include "chrome/browser/profile.h" 34 #include "chrome/browser/profile.h"
35 #include "chrome/common/chrome_paths.h" 35 #include "chrome/common/chrome_paths.h"
36 #include "chrome/common/chrome_version_info.h"
36 #include "chrome/common/net/url_request_context_getter.h" 37 #include "chrome/common/net/url_request_context_getter.h"
37 #include "chrome/common/url_constants.h" 38 #include "chrome/common/url_constants.h"
38 #include "grit/generated_resources.h" 39 #include "grit/generated_resources.h"
39 #include "grit/net_internals_resources.h" 40 #include "grit/net_internals_resources.h"
40 #include "net/base/escape.h" 41 #include "net/base/escape.h"
41 #include "net/base/host_resolver_impl.h" 42 #include "net/base/host_resolver_impl.h"
42 #include "net/base/net_errors.h" 43 #include "net/base/net_errors.h"
43 #include "net/base/net_util.h" 44 #include "net/base/net_util.h"
44 #include "net/base/sys_addrinfo.h" 45 #include "net/base/sys_addrinfo.h"
45 #include "net/disk_cache/disk_cache.h" 46 #include "net/disk_cache/disk_cache.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 482
482 CallJavascriptFunction(L"g_browser.receivedLogEventTypeConstants", dict); 483 CallJavascriptFunction(L"g_browser.receivedLogEventTypeConstants", dict);
483 } 484 }
484 485
485 // Tell the javascript about the version of the client and its 486 // Tell the javascript about the version of the client and its
486 // command line arguments. 487 // command line arguments.
487 { 488 {
488 DictionaryValue* dict = new DictionaryValue(); 489 DictionaryValue* dict = new DictionaryValue();
489 490
490 scoped_ptr<FileVersionInfo> version_info( 491 scoped_ptr<FileVersionInfo> version_info(
491 chrome_app::GetChromeVersionInfo()); 492 chrome::GetChromeVersionInfo());
492 493
493 if (version_info == NULL) { 494 if (version_info == NULL) {
494 DLOG(ERROR) << "Unable to create FileVersionInfo object"; 495 DLOG(ERROR) << "Unable to create FileVersionInfo object";
495 496
496 } else { 497 } else {
497 // We have everything we need to send the right values. 498 // We have everything we need to send the right values.
498 dict->SetString(L"version", version_info->file_version()); 499 dict->SetString(L"version", version_info->file_version());
499 dict->SetString(L"cl", version_info->last_change()); 500 dict->SetString(L"cl", version_info->last_change());
500 dict->SetStringFromUTF16(L"version_mod", 501 dict->SetStringFromUTF16(L"version_mod",
501 platform_util::GetVersionStringModifier()); 502 platform_util::GetVersionStringModifier());
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); 887 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource();
887 888
888 // Set up the chrome://net-internals/ source. 889 // Set up the chrome://net-internals/ source.
889 ChromeThread::PostTask( 890 ChromeThread::PostTask(
890 ChromeThread::IO, FROM_HERE, 891 ChromeThread::IO, FROM_HERE,
891 NewRunnableMethod( 892 NewRunnableMethod(
892 Singleton<ChromeURLDataManager>::get(), 893 Singleton<ChromeURLDataManager>::get(),
893 &ChromeURLDataManager::AddDataSource, 894 &ChromeURLDataManager::AddDataSource,
894 make_scoped_refptr(html_source))); 895 make_scoped_refptr(html_source)));
895 } 896 }
OLDNEW
« no previous file with comments | « chrome/browser/diagnostics/recon_diagnostics.cc ('k') | chrome/browser/extensions/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698