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

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

Issue 1467143002: [iOS] Remove support for asynchronous pref creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 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
« no previous file with comments | « no previous file | ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 created_local_state_ = true; 191 created_local_state_ = true;
192 192
193 base::FilePath local_state_path; 193 base::FilePath local_state_path;
194 CHECK(PathService::Get(ios::FILE_LOCAL_STATE, &local_state_path)); 194 CHECK(PathService::Get(ios::FILE_LOCAL_STATE, &local_state_path));
195 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple); 195 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple);
196 196
197 // Register local state preferences. 197 // Register local state preferences.
198 RegisterLocalStatePrefs(pref_registry.get()); 198 RegisterLocalStatePrefs(pref_registry.get());
199 199
200 local_state_ = ::CreateLocalState( 200 local_state_ = ::CreateLocalState(
201 local_state_path, local_state_task_runner_.get(), pref_registry, false); 201 local_state_path, local_state_task_runner_.get(), pref_registry);
202 202
203 const int max_per_proxy = 203 const int max_per_proxy =
204 local_state_->GetInteger(ios::prefs::kMaxConnectionsPerProxy); 204 local_state_->GetInteger(ios::prefs::kMaxConnectionsPerProxy);
205 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server( 205 net::ClientSocketPoolManager::set_max_sockets_per_proxy_server(
206 net::HttpNetworkSession::NORMAL_SOCKET_POOL, 206 net::HttpNetworkSession::NORMAL_SOCKET_POOL,
207 std::max(std::min(max_per_proxy, 99), 207 std::max(std::min(max_per_proxy, 99),
208 net::ClientSocketPoolManager::max_sockets_per_group( 208 net::ClientSocketPoolManager::max_sockets_per_group(
209 net::HttpNetworkSession::NORMAL_SOCKET_POOL))); 209 net::HttpNetworkSession::NORMAL_SOCKET_POOL)));
210 210
211 // Register the shutdown state before anything changes it. 211 // Register the shutdown state before anything changes it.
212 if (local_state_->HasPrefPath(prefs::kLastSessionExitedCleanly)) { 212 if (local_state_->HasPrefPath(prefs::kLastSessionExitedCleanly)) {
213 was_last_shutdown_clean_ = 213 was_last_shutdown_clean_ =
214 local_state_->GetBoolean(prefs::kLastSessionExitedCleanly); 214 local_state_->GetBoolean(prefs::kLastSessionExitedCleanly);
215 } 215 }
216 } 216 }
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698