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

Side by Side Diff: chrome/browser/chromeos/login/users/avatar/user_image_manager_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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "url/gurl.h" 72 #include "url/gurl.h"
73 73
74 namespace chromeos { 74 namespace chromeos {
75 75
76 namespace { 76 namespace {
77 77
78 const char kTestUser1[] = "test-user@example.com"; 78 const char kTestUser1[] = "test-user@example.com";
79 const char kTestUser2[] = "test-user2@example.com"; 79 const char kTestUser2[] = "test-user2@example.com";
80 80
81 policy::CloudPolicyStore* GetStoreForUser(const user_manager::User* user) { 81 policy::CloudPolicyStore* GetStoreForUser(const user_manager::User* user) {
82 Profile* profile = ProfileHelper::Get()->GetProfileByUser(user); 82 Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user);
83 if (!profile) { 83 if (!profile) {
84 ADD_FAILURE(); 84 ADD_FAILURE();
85 return NULL; 85 return NULL;
86 } 86 }
87 policy::UserCloudPolicyManagerChromeOS* policy_manager = 87 policy::UserCloudPolicyManagerChromeOS* policy_manager =
88 policy::UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); 88 policy::UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile);
89 if (!policy_manager) { 89 if (!policy_manager) {
90 ADD_FAILURE(); 90 ADD_FAILURE();
91 return NULL; 91 return NULL;
92 } 92 }
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 876
877 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load(); 877 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load();
878 ASSERT_TRUE(saved_image); 878 ASSERT_TRUE(saved_image);
879 879
880 // Check image dimensions. Images can't be compared since JPEG is lossy. 880 // Check image dimensions. Images can't be compared since JPEG is lossy.
881 EXPECT_EQ(policy_image_->width(), saved_image->width()); 881 EXPECT_EQ(policy_image_->width(), saved_image->width());
882 EXPECT_EQ(policy_image_->height(), saved_image->height()); 882 EXPECT_EQ(policy_image_->height(), saved_image->height());
883 } 883 }
884 884
885 } // namespace chromeos 885 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698