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

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

Issue 903733002: Fix leak: properly destroy TimezoneResolver instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 timezone_resolver_.reset();
sky 2015/02/05 17:59:22 timezone_resolver_ is a scoped_ptr, so why is this
Alexander Alekseev 2015/02/05 18:37:18 Done.
129 profile_helper_.reset(); 130 profile_helper_.reset();
130 } 131 }
131 132
132 scoped_ptr<policy::BrowserPolicyConnector> 133 scoped_ptr<policy::BrowserPolicyConnector>
133 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { 134 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() {
134 return scoped_ptr<policy::BrowserPolicyConnector>( 135 return scoped_ptr<policy::BrowserPolicyConnector>(
135 new policy::BrowserPolicyConnectorChromeOS()); 136 new policy::BrowserPolicyConnectorChromeOS());
136 } 137 }
137 138
138 void BrowserProcessPlatformPart::CreateProfileHelper() { 139 void BrowserProcessPlatformPart::CreateProfileHelper() {
139 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); 140 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL);
140 created_profile_helper_ = true; 141 created_profile_helper_ = true;
141 profile_helper_.reset(new chromeos::ProfileHelper()); 142 profile_helper_.reset(new chromeos::ProfileHelper());
142 } 143 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698