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

Side by Side Diff: chrome/browser/chromeos/login/saml/saml_browsertest.cc

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 6 years, 4 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 std::string SAMLPolicyTest::GetCookieValue(const std::string& name) { 809 std::string SAMLPolicyTest::GetCookieValue(const std::string& name) {
810 for (net::CookieList::const_iterator it = cookie_list_.begin(); 810 for (net::CookieList::const_iterator it = cookie_list_.begin();
811 it != cookie_list_.end(); ++it) { 811 it != cookie_list_.end(); ++it) {
812 if (it->Name() == name) 812 if (it->Name() == name)
813 return it->Value(); 813 return it->Value();
814 } 814 }
815 return std::string(); 815 return std::string();
816 } 816 }
817 817
818 void SAMLPolicyTest::GetCookies() { 818 void SAMLPolicyTest::GetCookies() {
819 Profile* profile =chromeos::ProfileHelper::Get()->GetProfileByUser( 819 Profile* profile = chromeos::ProfileHelper::Get()->GetProfileByUserUnsafe(
820 UserManager::Get()->GetActiveUser()); 820 UserManager::Get()->GetActiveUser());
821 ASSERT_TRUE(profile); 821 ASSERT_TRUE(profile);
822 base::RunLoop run_loop; 822 base::RunLoop run_loop;
823 content::BrowserThread::PostTask( 823 content::BrowserThread::PostTask(
824 content::BrowserThread::IO, 824 content::BrowserThread::IO,
825 FROM_HERE, 825 FROM_HERE,
826 base::Bind(&SAMLPolicyTest::GetCookiesOnIOThread, 826 base::Bind(&SAMLPolicyTest::GetCookiesOnIOThread,
827 base::Unretained(this), 827 base::Unretained(this),
828 scoped_refptr<net::URLRequestContextGetter>( 828 scoped_refptr<net::URLRequestContextGetter>(
829 profile->GetRequestContext()), 829 profile->GetRequestContext()),
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 kTestAuthSIDCookie1, 975 kTestAuthSIDCookie1,
976 kTestAuthLSIDCookie1); 976 kTestAuthLSIDCookie1);
977 977
978 GetCookies(); 978 GetCookies();
979 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); 979 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName));
980 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); 980 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName));
981 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); 981 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName));
982 } 982 }
983 983
984 } // namespace chromeos 984 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.cc ('k') | chrome/browser/chromeos/login/screens/user_image_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698