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

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

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use Polymer where relevant. Created 4 years, 11 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
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_downloader.h" 5 #include "chrome/browser/profiles/profile_downloader.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile_downloader_delegate.h" 9 #include "chrome/browser/profiles/profile_downloader_delegate.h"
10 #include "chrome/browser/signin/account_fetcher_service_factory.h" 10 #include "chrome/browser/signin/account_fetcher_service_factory.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 AccountTrackerServiceFactory::GetForProfile(profile_.get()); 55 AccountTrackerServiceFactory::GetForProfile(profile_.get());
56 account_fetcher_service_ = static_cast<FakeAccountFetcherService*>( 56 account_fetcher_service_ = static_cast<FakeAccountFetcherService*>(
57 AccountFetcherServiceFactory::GetForProfile(profile_.get())); 57 AccountFetcherServiceFactory::GetForProfile(profile_.get()));
58 signin_client_ = static_cast<TestSigninClient*>( 58 signin_client_ = static_cast<TestSigninClient*>(
59 ChromeSigninClientFactory::GetForProfile(profile_.get())); 59 ChromeSigninClientFactory::GetForProfile(profile_.get()));
60 signin_client_->SetURLRequestContext(profile_->GetRequestContext()); 60 signin_client_->SetURLRequestContext(profile_->GetRequestContext());
61 profile_downloader_.reset(new ProfileDownloader(this)); 61 profile_downloader_.reset(new ProfileDownloader(this));
62 } 62 }
63 63
64 bool NeedsProfilePicture() const override { return true; }; 64 bool NeedsProfilePicture() const override { return true; };
65 int GetDesiredImageSideLength() const override { return 128; }; 65 unsigned int GetDesiredImageSideLength() const override { return 128; };
66 std::string GetCachedPictureURL() const override { return ""; }; 66 std::string GetCachedPictureURL() const override { return ""; };
67 Profile* GetBrowserProfile() override { return profile_.get(); }; 67 Profile* GetBrowserProfile() override { return profile_.get(); };
68 bool IsPreSignin() const override { return false; } 68 bool IsPreSignin() const override { return false; }
69 void OnProfileDownloadSuccess(ProfileDownloader* downloader) override { 69 void OnProfileDownloadSuccess(ProfileDownloader* downloader) override {
70 70
71 } 71 }
72 void OnProfileDownloadFailure( 72 void OnProfileDownloadFailure(
73 ProfileDownloader* downloader, 73 ProfileDownloader* downloader,
74 ProfileDownloaderDelegate::FailureReason reason) override {} 74 ProfileDownloaderDelegate::FailureReason reason) override {}
75 75
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Not default G+ photo 126 // Not default G+ photo
127 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( 127 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL(
128 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAAAA/G/photo.jpg")); 128 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAAAA/G/photo.jpg"));
129 // Not default with 6 components 129 // Not default with 6 components
130 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( 130 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL(
131 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg")); 131 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg"));
132 // Not default with 7 components 132 // Not default with 7 components
133 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( 133 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL(
134 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s32-c/photo.jpg")); 134 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s32-c/photo.jpg"));
135 } 135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698