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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « chrome/browser/shell_integration_mac.mm ('k') | chrome/browser/signin/easy_unlock_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/content_settings/cookie_settings_factory.h" 11 #include "chrome/browser/content_settings/cookie_settings_factory.h"
12 #include "chrome/browser/profiles/profile_info_cache.h" 12 #include "chrome/browser/profiles/profile_info_cache.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/profiles/profile_metrics.h" 14 #include "chrome/browser/profiles/profile_metrics.h"
15 #include "chrome/browser/profiles/profile_window.h" 15 #include "chrome/browser/profiles/profile_window.h"
16 #include "chrome/browser/signin/local_auth.h" 16 #include "chrome/browser/signin/local_auth.h"
17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
18 #include "chrome/browser/web_data_service_factory.h" 18 #include "chrome/browser/web_data_service_factory.h"
19 #include "chrome/common/chrome_version_info.h" 19 #include "chrome/common/channel_info.h"
20 #include "components/content_settings/core/browser/cookie_settings.h" 20 #include "components/content_settings/core/browser/cookie_settings.h"
21 #include "components/metrics/metrics_service.h" 21 #include "components/metrics/metrics_service.h"
22 #include "components/signin/core/browser/profile_oauth2_token_service.h" 22 #include "components/signin/core/browser/profile_oauth2_token_service.h"
23 #include "components/signin/core/browser/signin_cookie_changed_subscription.h" 23 #include "components/signin/core/browser/signin_cookie_changed_subscription.h"
24 #include "components/signin/core/browser/signin_header_helper.h" 24 #include "components/signin/core/browser/signin_header_helper.h"
25 #include "components/signin/core/common/profile_management_switches.h" 25 #include "components/signin/core/common/profile_management_switches.h"
26 #include "components/signin/core/common/signin_pref_names.h" 26 #include "components/signin/core/common/signin_pref_names.h"
27 #include "components/signin/core/common/signin_switches.h" 27 #include "components/signin/core/common/signin_switches.h"
28 #include "google_apis/gaia/gaia_constants.h" 28 #include "google_apis/gaia/gaia_constants.h"
29 #include "google_apis/gaia/gaia_urls.h" 29 #include "google_apis/gaia/gaia_urls.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { 177 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() {
178 return profile_->GetRequestContext(); 178 return profile_->GetRequestContext();
179 } 179 }
180 180
181 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { 181 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() {
182 return !switches::IsEnableAccountConsistency(); 182 return !switches::IsEnableAccountConsistency();
183 } 183 }
184 184
185 std::string ChromeSigninClient::GetProductVersion() { 185 std::string ChromeSigninClient::GetProductVersion() {
186 chrome::VersionInfo chrome_version; 186 return chrome::GetVersionString();
187 return chrome_version.CreateVersionString();
188 } 187 }
189 188
190 bool ChromeSigninClient::IsFirstRun() const { 189 bool ChromeSigninClient::IsFirstRun() const {
191 #if defined(OS_ANDROID) 190 #if defined(OS_ANDROID)
192 return false; 191 return false;
193 #else 192 #else
194 return first_run::IsChromeFirstRun(); 193 return first_run::IsChromeFirstRun();
195 #endif 194 #endif
196 } 195 }
197 196
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // If we don't have a token for detecting a password change, create one. 371 // If we don't have a token for detecting a password change, create one.
373 ProfileOAuth2TokenService* token_service = 372 ProfileOAuth2TokenService* token_service =
374 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); 373 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
375 OAuth2TokenService::ScopeSet scopes; 374 OAuth2TokenService::ScopeSet scopes;
376 scopes.insert(GaiaConstants::kGoogleUserInfoEmail); 375 scopes.insert(GaiaConstants::kGoogleUserInfoEmail);
377 oauth_request_ = token_service->StartRequest(account, scopes, this); 376 oauth_request_ = token_service->StartRequest(account, scopes, this);
378 } 377 }
379 } 378 }
380 #endif 379 #endif
381 } 380 }
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_mac.mm ('k') | chrome/browser/signin/easy_unlock_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698