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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.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/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs. 72 // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs.
73 const char kGuestModeLoggingLevel[] = "1"; 73 const char kGuestModeLoggingLevel[] = "1";
74 74
75 // Format of command line switch. 75 // Format of command line switch.
76 const char kSwitchFormatString[] = " --%s=\"%s\""; 76 const char kSwitchFormatString[] = " --%s=\"%s\"";
77 77
78 // User name which is used in the Guest session. 78 // User name which is used in the Guest session.
79 const char kGuestUserName[] = ""; 79 const char kGuestUserName[] = "";
80 80
81 } // namespace
82
81 // Resets the proxy configuration service for the default request context. 83 // Resets the proxy configuration service for the default request context.
82 class ResetDefaultProxyConfigServiceTask : public Task { 84 class ResetDefaultProxyConfigServiceTask : public Task {
Nikita (slow) 2011/07/20 13:55:17 Why move ResetDefaultProxyConfigServiceTask out of
willchan no longer on Chromium 2011/07/20 13:59:07 Since I locked it down with a friend declaration w
83 public: 85 public:
84 ResetDefaultProxyConfigServiceTask( 86 ResetDefaultProxyConfigServiceTask(
85 net::ProxyConfigService* proxy_config_service) 87 net::ProxyConfigService* proxy_config_service)
86 : proxy_config_service_(proxy_config_service) {} 88 : proxy_config_service_(proxy_config_service) {}
87 virtual ~ResetDefaultProxyConfigServiceTask() {} 89 virtual ~ResetDefaultProxyConfigServiceTask() {}
88 90
89 // Task override. 91 // Task override.
90 virtual void Run() { 92 virtual void Run() {
91 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 93 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
92 net::URLRequestContextGetter* getter = Profile::GetDefaultRequestContext(); 94 // TODO(willchan): Move this class back into the anonymous namespace after
95 // we stop using this deprecated API.
96 net::URLRequestContextGetter* getter =
97 Profile::Deprecated::GetDefaultRequestContext();
93 DCHECK(getter); 98 DCHECK(getter);
94 if (getter) { 99 if (getter) {
95 getter->GetURLRequestContext()->proxy_service()->ResetConfigService( 100 getter->GetURLRequestContext()->proxy_service()->ResetConfigService(
96 proxy_config_service_.release()); 101 proxy_config_service_.release());
97 } 102 }
98 } 103 }
99 104
100 private: 105 private:
101 scoped_ptr<net::ProxyConfigService> proxy_config_service_; 106 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
102 107
103 DISALLOW_COPY_AND_ASSIGN(ResetDefaultProxyConfigServiceTask); 108 DISALLOW_COPY_AND_ASSIGN(ResetDefaultProxyConfigServiceTask);
104 }; 109 };
105 110
106 } // namespace
107
108 class LoginUtilsImpl : public LoginUtils, 111 class LoginUtilsImpl : public LoginUtils,
109 public ProfileManagerObserver { 112 public ProfileManagerObserver {
110 public: 113 public:
111 LoginUtilsImpl() 114 LoginUtilsImpl()
112 : background_view_(NULL) { 115 : background_view_(NULL) {
113 } 116 }
114 117
115 virtual void PrepareProfile( 118 virtual void PrepareProfile(
116 const std::string& username, 119 const std::string& username,
117 const std::string& password, 120 const std::string& password,
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // Mark login host for deletion after browser starts. This 617 // Mark login host for deletion after browser starts. This
615 // guarantees that the message loop will be referenced by the 618 // guarantees that the message loop will be referenced by the
616 // browser before it is dereferenced by the login host. 619 // browser before it is dereferenced by the login host.
617 if (login_host) { 620 if (login_host) {
618 login_host->OnSessionStart(); 621 login_host->OnSessionStart();
619 login_host = NULL; 622 login_host = NULL;
620 } 623 }
621 } 624 }
622 625
623 } // namespace chromeos 626 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/libcros_service_library.cc ('k') | chrome/browser/importer/toolbar_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698