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

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

Issue 1419103009: [Sync] Componentize ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@max_bogue_sync_backend_host
Patch Set: Created 5 years, 1 month 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 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 "base/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "base/threading/platform_thread.h" 6 #include "base/threading/platform_thread.h"
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
9 #include "chrome/browser/sync/profile_sync_service.h"
10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
11 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 10 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
12 #include "chrome/browser/sync/test/integration/single_client_status_change_check er.h" 11 #include "chrome/browser/sync/test/integration/single_client_status_change_check er.h"
13 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" 12 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
14 #include "chrome/browser/sync/test/integration/sync_test.h" 13 #include "chrome/browser/sync/test/integration/sync_test.h"
14 #include "components/browser_sync/browser/profile_sync_service.h"
15 #include "components/signin/core/browser/profile_oauth2_token_service.h" 15 #include "components/signin/core/browser/profile_oauth2_token_service.h"
16 #include "google_apis/gaia/google_service_auth_error.h" 16 #include "google_apis/gaia/google_service_auth_error.h"
17 #include "net/http/http_status_code.h" 17 #include "net/http/http_status_code.h"
18 #include "net/url_request/url_request_status.h" 18 #include "net/url_request/url_request_status.h"
19 19
20 using bookmarks_helper::AddURL; 20 using bookmarks_helper::AddURL;
21 using sync_integration_test_util::AwaitCommitActivityCompletion; 21 using sync_integration_test_util::AwaitCommitActivityCompletion;
22 22
23 const char kShortLivedOAuth2Token[] = 23 const char kShortLivedOAuth2Token[] =
24 "{" 24 "{"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 GetFakeServer()->SetAuthenticated(); 298 GetFakeServer()->SetAuthenticated();
299 SetOAuth2TokenResponse(kValidOAuth2Token, 299 SetOAuth2TokenResponse(kValidOAuth2Token,
300 net::HTTP_OK, 300 net::HTTP_OK,
301 net::URLRequestStatus::SUCCESS); 301 net::URLRequestStatus::SUCCESS);
302 302
303 // Verify that the next sync cycle is successful, and uses the new auth token. 303 // Verify that the next sync cycle is successful, and uses the new auth token.
304 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0)))); 304 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0))));
305 std::string new_token = GetSyncService((0))->GetAccessTokenForTest(); 305 std::string new_token = GetSyncService((0))->GetAccessTokenForTest();
306 ASSERT_NE(old_token, new_token); 306 ASSERT_NE(old_token, new_token);
307 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698