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

Side by Side Diff: ios/chrome/browser/application_context_impl.cc

Issue 1380763003: [iOS] Integration of ChromeNetLog and NetExportUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup whitelist Created 5 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ios/chrome/browser/application_context_impl.h" 5 #include "ios/chrome/browser/application_context_impl.h"
6 6
7 #include "base/command_line.h"
8 #include "base/files/file_path.h"
7 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/net_log/chrome_net_log.h"
8 #include "components/translate/core/browser/translate_download_manager.h" 11 #include "components/translate/core/browser/translate_download_manager.h"
12 #include "ios/chrome/common/channel_info.h"
9 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 13 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
14 #include "net/log/net_log_capture_mode.h"
10 15
11 ApplicationContextImpl::ApplicationContextImpl() { 16 ApplicationContextImpl::ApplicationContextImpl(
17 const base::CommandLine& command_line) {
12 DCHECK(!GetApplicationContext()); 18 DCHECK(!GetApplicationContext());
13 SetApplicationContext(this); 19 SetApplicationContext(this);
20
21 net_log_.reset(new net_log::ChromeNetLog(
22 base::FilePath(), net::NetLogCaptureMode::Default(),
23 command_line.GetCommandLineString(), GetChannelString()));
14 } 24 }
15 25
16 ApplicationContextImpl::~ApplicationContextImpl() { 26 ApplicationContextImpl::~ApplicationContextImpl() {
17 DCHECK_EQ(this, GetApplicationContext()); 27 DCHECK_EQ(this, GetApplicationContext());
18 SetApplicationContext(nullptr); 28 SetApplicationContext(nullptr);
19 } 29 }
20 30
21 PrefService* ApplicationContextImpl::GetLocalState() { 31 PrefService* ApplicationContextImpl::GetLocalState() {
22 DCHECK(thread_checker_.CalledOnValidThread()); 32 DCHECK(thread_checker_.CalledOnValidThread());
23 return ios::GetChromeBrowserProvider()->GetLocalState(); 33 return ios::GetChromeBrowserProvider()->GetLocalState();
(...skipping 28 matching lines...) Expand all
52 } 62 }
53 63
54 policy::BrowserPolicyConnector* 64 policy::BrowserPolicyConnector*
55 ApplicationContextImpl::GetBrowserPolicyConnector() { 65 ApplicationContextImpl::GetBrowserPolicyConnector() {
56 return ios::GetChromeBrowserProvider()->GetBrowserPolicyConnector(); 66 return ios::GetChromeBrowserProvider()->GetBrowserPolicyConnector();
57 } 67 }
58 68
59 rappor::RapporService* ApplicationContextImpl::GetRapporService() { 69 rappor::RapporService* ApplicationContextImpl::GetRapporService() {
60 return ios::GetChromeBrowserProvider()->GetRapporService(); 70 return ios::GetChromeBrowserProvider()->GetRapporService();
61 } 71 }
72
73 net_log::ChromeNetLog* ApplicationContextImpl::GetNetLog() {
74 return net_log_.get();
75 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/application_context_impl.h ('k') | ios/chrome/browser/chrome_url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698