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

Side by Side Diff: components/signin/core/browser/signin_manager.cc

Issue 554233002: Refactoring the WeakPtrFactory usage, Member variables should appear before the WeakPtrFactory, to … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/signin/core/browser/signin_manager.h" 5 #include "components/signin/core/browser/signin_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return net::UnescapeURLComponent(url.query(), 56 return net::UnescapeURLComponent(url.query(),
57 net::UnescapeRule::URL_SPECIAL_CHARS) 57 net::UnescapeRule::URL_SPECIAL_CHARS)
58 .find(kChromiumSyncService) != std::string::npos; 58 .find(kChromiumSyncService) != std::string::npos;
59 } 59 }
60 60
61 SigninManager::SigninManager(SigninClient* client, 61 SigninManager::SigninManager(SigninClient* client,
62 ProfileOAuth2TokenService* token_service) 62 ProfileOAuth2TokenService* token_service)
63 : SigninManagerBase(client), 63 : SigninManagerBase(client),
64 prohibit_signout_(false), 64 prohibit_signout_(false),
65 type_(SIGNIN_TYPE_NONE), 65 type_(SIGNIN_TYPE_NONE),
66 weak_pointer_factory_(this),
67 client_(client), 66 client_(client),
68 token_service_(token_service) {} 67 token_service_(token_service),
68 weak_pointer_factory_(this) {}
69 69
70 void SigninManager::AddMergeSessionObserver( 70 void SigninManager::AddMergeSessionObserver(
71 MergeSessionHelper::Observer* observer) { 71 MergeSessionHelper::Observer* observer) {
72 if (merge_session_helper_) 72 if (merge_session_helper_)
73 merge_session_helper_->AddObserver(observer); 73 merge_session_helper_->AddObserver(observer);
74 } 74 }
75 75
76 void SigninManager::RemoveMergeSessionObserver( 76 void SigninManager::RemoveMergeSessionObserver(
77 MergeSessionHelper::Observer* observer) { 77 MergeSessionHelper::Observer* observer) {
78 if (merge_session_helper_) 78 if (merge_session_helper_)
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 password_.clear(); // Don't need it anymore. 390 password_.clear(); // Don't need it anymore.
391 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again. 391 DisableOneClickSignIn(client_->GetPrefs()); // Don't ever offer again.
392 } 392 }
393 393
394 void SigninManager::ProhibitSignout(bool prohibit_signout) { 394 void SigninManager::ProhibitSignout(bool prohibit_signout) {
395 prohibit_signout_ = prohibit_signout; 395 prohibit_signout_ = prohibit_signout;
396 } 396 }
397 397
398 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } 398 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698