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

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

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 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" 9 #include "chrome/browser/sync/profile_sync_service.h"
10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 "}"; 44 "}";
45 45
46 const char kEmptyOAuth2Token[] = ""; 46 const char kEmptyOAuth2Token[] = "";
47 47
48 const char kMalformedOAuth2Token[] = "{ \"foo\": "; 48 const char kMalformedOAuth2Token[] = "{ \"foo\": ";
49 49
50 class TestForAuthError : public SingleClientStatusChangeChecker { 50 class TestForAuthError : public SingleClientStatusChangeChecker {
51 public: 51 public:
52 explicit TestForAuthError(ProfileSyncService* service); 52 explicit TestForAuthError(ProfileSyncService* service);
53 virtual ~TestForAuthError(); 53 virtual ~TestForAuthError();
54 virtual bool IsExitConditionSatisfied() OVERRIDE; 54 virtual bool IsExitConditionSatisfied() override;
55 virtual std::string GetDebugMessage() const OVERRIDE; 55 virtual std::string GetDebugMessage() const override;
56 }; 56 };
57 57
58 TestForAuthError::TestForAuthError(ProfileSyncService* service) 58 TestForAuthError::TestForAuthError(ProfileSyncService* service)
59 : SingleClientStatusChangeChecker(service) {} 59 : SingleClientStatusChangeChecker(service) {}
60 60
61 TestForAuthError::~TestForAuthError() {} 61 TestForAuthError::~TestForAuthError() {}
62 62
63 bool TestForAuthError::IsExitConditionSatisfied() { 63 bool TestForAuthError::IsExitConditionSatisfied() {
64 return !service()->HasUnsyncedItems() || 64 return !service()->HasUnsyncedItems() ||
65 (service()->GetSyncTokenStatus().last_get_token_error.state() != 65 (service()->GetSyncTokenStatus().last_get_token_error.state() !=
(...skipping 232 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