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

Side by Side Diff: chrome/browser/chrome_to_mobile_service_unittest.cc

Issue 15580002: Make use of InvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More review fixes Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_to_mobile_service.h" 5 #include "chrome/browser/chrome_to_mobile_service.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/chrome_to_mobile_service_factory.h" 9 #include "chrome/browser/chrome_to_mobile_service_factory.h"
10 #include "chrome/browser/command_updater.h" 10 #include "chrome/browser/command_updater.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 private: 47 private:
48 FeatureSwitch::ScopedOverride enable_action_box_; 48 FeatureSwitch::ScopedOverride enable_action_box_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileServiceTest); 50 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileServiceTest);
51 }; 51 };
52 52
53 // Chrome To Mobile is currently gated on the Action Box UI, 53 // Chrome To Mobile is currently gated on the Action Box UI,
54 // so need to enable this feature for the test. 54 // so need to enable this feature for the test.
55 ChromeToMobileServiceTest::ChromeToMobileServiceTest() 55 ChromeToMobileServiceTest::ChromeToMobileServiceTest()
56 : enable_action_box_(FeatureSwitch::action_box(), true) {} 56 : enable_action_box_(FeatureSwitch::action_box(), true) {
akalin 2013/05/24 22:58:46 revert diff (or change the destructor to match)
rlarocque 2013/05/29 00:37:55 Done.
57 }
57 58
58 ChromeToMobileServiceTest::~ChromeToMobileServiceTest() {} 59 ChromeToMobileServiceTest::~ChromeToMobileServiceTest() {}
59 60
60 ChromeToMobileService* ChromeToMobileServiceTest::GetService() const { 61 ChromeToMobileService* ChromeToMobileServiceTest::GetService() const {
61 return ChromeToMobileServiceFactory::GetForProfile(profile()); 62 return ChromeToMobileServiceFactory::GetForProfile(profile());
62 } 63 }
63 64
64 bool ChromeToMobileServiceTest::UpdateAndGetVerifiedCommandState() { 65 bool ChromeToMobileServiceTest::UpdateAndGetVerifiedCommandState() {
65 bool state = ChromeToMobileService::UpdateAndGetCommandState(browser()); 66 bool state = ChromeToMobileService::UpdateAndGetCommandState(browser());
66 CommandUpdater* updater = browser()->command_controller()->command_updater(); 67 CommandUpdater* updater = browser()->command_controller()->command_updater();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Send a Gaia OAuth2 Login service dummy token (should clear the token). 198 // Send a Gaia OAuth2 Login service dummy token (should clear the token).
198 TokenService::TokenAvailableDetails login_details( 199 TokenService::TokenAvailableDetails login_details(
199 GaiaConstants::kGaiaOAuth2LoginRefreshToken, dummy_string); 200 GaiaConstants::kGaiaOAuth2LoginRefreshToken, dummy_string);
200 service->Observe(chrome::NOTIFICATION_TOKEN_AVAILABLE, 201 service->Observe(chrome::NOTIFICATION_TOKEN_AVAILABLE,
201 content::Source<ChromeToMobileServiceTest>(this), 202 content::Source<ChromeToMobileServiceTest>(this),
202 content::Details<TokenService::TokenAvailableDetails>(&login_details)); 203 content::Details<TokenService::TokenAvailableDetails>(&login_details));
203 EXPECT_TRUE(service->GetAccessTokenForTest().empty()); 204 EXPECT_TRUE(service->GetAccessTokenForTest().empty());
204 } 205 }
205 206
206 } // namespace 207 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698