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

Side by Side Diff: chrome/browser/sync/test/integration/profile_sync_service_harness.cc

Issue 137553007: User cloud policy token forwarder: Replace PO2TS::GetPrimaryAccountId() with SMB::GetAuthenticatedAc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 years, 9 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
« no previous file with comments | « chrome/browser/signin/signin_manager_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync/test/integration/profile_sync_service_harness.h" 5 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <iterator> 8 #include <iterator>
9 #include <ostream> 9 #include <ostream>
10 #include <set> 10 #include <set>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 LOG(ERROR) << "SetupSync(): service() is null."; 210 LOG(ERROR) << "SetupSync(): service() is null.";
211 return false; 211 return false;
212 } 212 }
213 213
214 // Tell the sync service that setup is in progress so we don't start syncing 214 // Tell the sync service that setup is in progress so we don't start syncing
215 // until we've finished configuration. 215 // until we've finished configuration.
216 service()->SetSetupInProgress(true); 216 service()->SetSetupInProgress(true);
217 217
218 // Authenticate sync client using GAIA credentials. 218 // Authenticate sync client using GAIA credentials.
219 service()->signin()->SetAuthenticatedUsername(username_); 219 service()->signin()->SetAuthenticatedUsername(username_);
220 profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
221 username_);
222 GoogleServiceSigninSuccessDetails details(username_, password_); 220 GoogleServiceSigninSuccessDetails details(username_, password_);
223 content::NotificationService::current()->Notify( 221 content::NotificationService::current()->Notify(
224 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, 222 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
225 content::Source<Profile>(profile_), 223 content::Source<Profile>(profile_),
226 content::Details<const GoogleServiceSigninSuccessDetails>(&details)); 224 content::Details<const GoogleServiceSigninSuccessDetails>(&details));
227 225
228 #if defined(ENABLE_MANAGED_USERS) 226 #if defined(ENABLE_MANAGED_USERS)
229 std::string account_id = profile_->IsManaged() ? 227 std::string account_id = profile_->IsManaged() ?
230 managed_users::kManagedUserPseudoEmail : username_; 228 managed_users::kManagedUserPseudoEmail : username_;
231 #else 229 #else
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 787
790 std::string ProfileSyncServiceHarness::GetServiceStatus() { 788 std::string ProfileSyncServiceHarness::GetServiceStatus() {
791 scoped_ptr<base::DictionaryValue> value( 789 scoped_ptr<base::DictionaryValue> value(
792 sync_ui_util::ConstructAboutInformation(service())); 790 sync_ui_util::ConstructAboutInformation(service()));
793 std::string service_status; 791 std::string service_status;
794 base::JSONWriter::WriteWithOptions(value.get(), 792 base::JSONWriter::WriteWithOptions(value.get(),
795 base::JSONWriter::OPTIONS_PRETTY_PRINT, 793 base::JSONWriter::OPTIONS_PRETTY_PRINT,
796 &service_status); 794 &service_status);
797 return service_status; 795 return service_status;
798 } 796 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698