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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor and address comments. Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 scoped_refptr<ChromeURLRequestContext> 220 scoped_refptr<ChromeURLRequestContext>
221 ProfileIOData::GetExtensionsRequestContext() const { 221 ProfileIOData::GetExtensionsRequestContext() const {
222 LazyInitialize(); 222 LazyInitialize();
223 scoped_refptr<ChromeURLRequestContext> context = 223 scoped_refptr<ChromeURLRequestContext> context =
224 AcquireExtensionsRequestContext(); 224 AcquireExtensionsRequestContext();
225 DCHECK(context); 225 DCHECK(context);
226 return context; 226 return context;
227 } 227 }
228 228
229 scoped_refptr<ChromeURLRequestContext>
230 ProfileIOData::GetIsolatedAppRequestContext(const Extension* app) const {
231 LazyInitialize();
232 scoped_refptr<ChromeURLRequestContext> context =
233 AcquireIsolatedAppRequestContext(app);
234 DCHECK(context);
235 return context;
236 }
237
229 void ProfileIOData::LazyInitialize() const { 238 void ProfileIOData::LazyInitialize() const {
230 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 239 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
231 if (initialized_) 240 if (initialized_)
232 return; 241 return;
233 LazyInitializeInternal(); 242 LazyInitializeInternal();
234 initialized_ = true; 243 initialized_ = true;
235 } 244 }
236 245
237 // static 246 // static
238 void ProfileIOData::ApplyProfileParamsToContext( 247 void ProfileIOData::ApplyProfileParamsToContext(
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 345
337 #if defined(OS_CHROMEOS) 346 #if defined(OS_CHROMEOS)
338 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { 347 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) {
339 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()-> 348 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()->
340 RegisterNetworkProxyHandler(proxy_service); 349 RegisterNetworkProxyHandler(proxy_service);
341 } 350 }
342 #endif // defined(OS_CHROMEOS) 351 #endif // defined(OS_CHROMEOS)
343 352
344 return proxy_service; 353 return proxy_service;
345 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698