OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_process_platform_part_chromeos.h" | 5 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 base::Bind(&chromeos::system::ApplyTimeZone), | 119 base::Bind(&chromeos::system::ApplyTimeZone), |
120 base::Bind(&chromeos::DelayNetworkCall, | 120 base::Bind(&chromeos::DelayNetworkCall, |
121 base::TimeDelta::FromMilliseconds( | 121 base::TimeDelta::FromMilliseconds( |
122 chromeos::kDefaultNetworkRetryDelayMS)), | 122 chromeos::kDefaultNetworkRetryDelayMS)), |
123 g_browser_process->local_state())); | 123 g_browser_process->local_state())); |
124 } | 124 } |
125 return timezone_resolver_.get(); | 125 return timezone_resolver_.get(); |
126 } | 126 } |
127 | 127 |
128 void BrowserProcessPlatformPart::StartTearDown() { | 128 void BrowserProcessPlatformPart::StartTearDown() { |
| 129 // interactive_ui_tests check for memory leaks before this object is |
| 130 // destroyed. So we need to destroy |timezone_resolver_| here. |
| 131 timezone_resolver_.reset(); |
129 profile_helper_.reset(); | 132 profile_helper_.reset(); |
130 } | 133 } |
131 | 134 |
132 scoped_ptr<policy::BrowserPolicyConnector> | 135 scoped_ptr<policy::BrowserPolicyConnector> |
133 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { | 136 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { |
134 return scoped_ptr<policy::BrowserPolicyConnector>( | 137 return scoped_ptr<policy::BrowserPolicyConnector>( |
135 new policy::BrowserPolicyConnectorChromeOS()); | 138 new policy::BrowserPolicyConnectorChromeOS()); |
136 } | 139 } |
137 | 140 |
138 void BrowserProcessPlatformPart::CreateProfileHelper() { | 141 void BrowserProcessPlatformPart::CreateProfileHelper() { |
139 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); | 142 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); |
140 created_profile_helper_ = true; | 143 created_profile_helper_ = true; |
141 profile_helper_.reset(new chromeos::ProfileHelper()); | 144 profile_helper_.reset(new chromeos::ProfileHelper()); |
142 } | 145 } |
OLD | NEW |