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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "chrome/browser/ui/sync/one_click_signin_sync_starter.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 void Callback(OneClickSigninSyncStarter::SyncSetupResult result) { 46 void Callback(OneClickSigninSyncStarter::SyncSetupResult result) {
47 if (result == OneClickSigninSyncStarter::SYNC_SETUP_SUCCESS) 47 if (result == OneClickSigninSyncStarter::SYNC_SETUP_SUCCESS)
48 ++succeeded_count_; 48 ++succeeded_count_;
49 else 49 else
50 ++failed_count_; 50 ++failed_count_;
51 } 51 }
52 52
53 // ChromeRenderViewHostTestHarness: 53 // ChromeRenderViewHostTestHarness:
54 virtual content::BrowserContext* CreateBrowserContext() override { 54 content::BrowserContext* CreateBrowserContext() override {
55 // Create the sign in manager required by OneClickSigninSyncStarter. 55 // Create the sign in manager required by OneClickSigninSyncStarter.
56 TestingProfile::Builder builder; 56 TestingProfile::Builder builder;
57 builder.AddTestingFactory( 57 builder.AddTestingFactory(
58 SigninManagerFactory::GetInstance(), 58 SigninManagerFactory::GetInstance(),
59 &OneClickSigninSyncStarterTest::BuildSigninManager); 59 &OneClickSigninSyncStarterTest::BuildSigninManager);
60 return builder.Build().release(); 60 return builder.Build().release();
61 } 61 }
62 62
63 protected: 63 protected:
64 void CreateSyncStarter(OneClickSigninSyncStarter::Callback callback, 64 void CreateSyncStarter(OneClickSigninSyncStarter::Callback callback,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 const GURL kTestURL = GURL("http://www.example.com"); 121 const GURL kTestURL = GURL("http://www.example.com");
122 CreateSyncStarter(base::Bind(&OneClickSigninSyncStarterTest::Callback, 122 CreateSyncStarter(base::Bind(&OneClickSigninSyncStarterTest::Callback,
123 base::Unretained(this)), 123 base::Unretained(this)),
124 kTestURL); 124 kTestURL);
125 sync_starter_->MergeSessionComplete( 125 sync_starter_->MergeSessionComplete(
126 GoogleServiceAuthError(GoogleServiceAuthError::NONE)); 126 GoogleServiceAuthError(GoogleServiceAuthError::NONE));
127 EXPECT_EQ(1, succeeded_count_); 127 EXPECT_EQ(1, succeeded_count_);
128 EXPECT_EQ(kTestURL, controller.GetPendingEntry()->GetURL()); 128 EXPECT_EQ(kTestURL, controller.GetPendingEntry()->GetURL());
129 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698