Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <map> | 6 #include <map> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 GoogleServiceSigninSuccessDetails details(GetAuthenticatedUsername(), | 132 GoogleServiceSigninSuccessDetails details(GetAuthenticatedUsername(), |
| 133 std::string()); | 133 std::string()); |
| 134 content::NotificationService::current()->Notify( | 134 content::NotificationService::current()->Notify( |
| 135 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, | 135 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, |
| 136 content::Source<Profile>(profile_), | 136 content::Source<Profile>(profile_), |
| 137 content::Details<const GoogleServiceSigninSuccessDetails>(&details)); | 137 content::Details<const GoogleServiceSigninSuccessDetails>(&details)); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void SignOut() { | 140 void SignOut() { |
| 141 clear_authenticated_username(); | 141 clear_authenticated_username(); |
| 142 profile()->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); | |
|
fgorski
2014/03/05 19:00:28
Could you change the code to this:
const std::st
Roger Tawa OOO till Jul 10th
2014/03/05 19:12:46
Good catch! Done.
| |
| 142 | 143 |
| 143 GoogleServiceSignoutDetails details(GetAuthenticatedUsername()); | 144 GoogleServiceSignoutDetails details(GetAuthenticatedUsername()); |
|
fgorski
2014/03/05 19:00:28
And use username here.
Roger Tawa OOO till Jul 10th
2014/03/05 19:12:46
Done.
| |
| 144 content::NotificationService::current()->Notify( | 145 content::NotificationService::current()->Notify( |
| 145 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, | 146 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, |
| 146 content::Source<Profile>(profile_), | 147 content::Source<Profile>(profile_), |
| 147 content::Details<const GoogleServiceSignoutDetails>(&details)); | 148 content::Details<const GoogleServiceSignoutDetails>(&details)); |
| 148 } | 149 } |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 } // namespace | 152 } // namespace |
| 152 | 153 |
| 153 class FakeGCMEventRouter : public GCMEventRouter { | 154 class FakeGCMEventRouter : public GCMEventRouter { |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1420 consumer()->gcm_event_router()->clear_results(); | 1421 consumer()->gcm_event_router()->clear_results(); |
| 1421 WaitUntilCompleted(); | 1422 WaitUntilCompleted(); |
| 1422 | 1423 |
| 1423 EXPECT_EQ(FakeGCMEventRouter::MESSAGE_EVENT, | 1424 EXPECT_EQ(FakeGCMEventRouter::MESSAGE_EVENT, |
| 1424 consumer()->gcm_event_router()->received_event()); | 1425 consumer()->gcm_event_router()->received_event()); |
| 1425 EXPECT_TRUE( | 1426 EXPECT_TRUE( |
| 1426 in_message5.data == consumer()->gcm_event_router()->message().data); | 1427 in_message5.data == consumer()->gcm_event_router()->message().data); |
| 1427 } | 1428 } |
| 1428 | 1429 |
| 1429 } // namespace gcm | 1430 } // namespace gcm |
| OLD | NEW |