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

Side by Side Diff: chrome/browser/chromeos/cros/libcros_service_library.cc

Issue 7438002: Deprecate Profile::GetDefaultRequestContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix other references. Created 9 years, 5 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/chromeos/cros/libcros_service_library.h" 5 #include "chrome/browser/chromeos/cros/libcros_service_library.h"
6 6
7 #include "base/synchronization/lock.h" 7 #include "base/synchronization/lock.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h" 8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 const std::string& source_url) { 199 const std::string& source_url) {
200 // Make sure we're running on IO thread. 200 // Make sure we're running on IO thread.
201 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 201 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
202 202
203 // Create a request slot for this proxy resolution request. 203 // Create a request slot for this proxy resolution request.
204 Request* request = new Request(source_url); 204 Request* request = new Request(source_url);
205 request->notify_task_ = NewRunnableMethod(this, 205 request->notify_task_ = NewRunnableMethod(this,
206 &NetworkProxyLibrary::NotifyProxyResolved, request); 206 &NetworkProxyLibrary::NotifyProxyResolved, request);
207 207
208 // Retrieve ProxyService from profile's request context. 208 // Retrieve ProxyService from profile's request context.
209 net::URLRequestContextGetter* getter = Profile::GetDefaultRequestContext(); 209 net::URLRequestContextGetter* getter =
210 Profile::Deprecated::GetDefaultRequestContext();
210 net::ProxyService* proxy_service = NULL; 211 net::ProxyService* proxy_service = NULL;
211 if (getter) 212 if (getter)
212 proxy_service = getter->GetURLRequestContext()->proxy_service(); 213 proxy_service = getter->GetURLRequestContext()->proxy_service();
213 214
214 // Check that we have valid proxy service and service_connection. 215 // Check that we have valid proxy service and service_connection.
215 if (!proxy_service) { 216 if (!proxy_service) {
216 request->error_ = "No proxy service in chrome"; 217 request->error_ = "No proxy service in chrome";
217 } else { 218 } else {
218 base::AutoLock lock(data_lock_); 219 base::AutoLock lock(data_lock_);
219 // Queue request slot. 220 // Queue request slot.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 305 }
305 306
306 } // namespace chromeos 307 } // namespace chromeos
307 308
308 // Allows InvokeLater without adding refcounting. This class is a Singleton and 309 // Allows InvokeLater without adding refcounting. This class is a Singleton and
309 // won't be deleted until it's last InvokeLater is run, so are all its 310 // won't be deleted until it's last InvokeLater is run, so are all its
310 // scoped_ptred class members. 311 // scoped_ptred class members.
311 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::LibCrosServiceLibraryImpl); 312 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::LibCrosServiceLibraryImpl);
312 DISABLE_RUNNABLE_METHOD_REFCOUNT( 313 DISABLE_RUNNABLE_METHOD_REFCOUNT(
313 chromeos::LibCrosServiceLibraryImpl::NetworkProxyLibrary); 314 chromeos::LibCrosServiceLibraryImpl::NetworkProxyLibrary);
314
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698