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

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

Issue 634583003: Simplify VersionInfo code, avoid hitting sandbox IPC constantly on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: linux include 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 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/guid.h" 8 #include "base/guid.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { 171 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() {
172 // If inline sign in is enabled, but account consistency is not, the user's 172 // If inline sign in is enabled, but account consistency is not, the user's
173 // credentials should be merge into the cookie jar. 173 // credentials should be merge into the cookie jar.
174 return !switches::IsEnableWebBasedSignin() && 174 return !switches::IsEnableWebBasedSignin() &&
175 !switches::IsEnableAccountConsistency(); 175 !switches::IsEnableAccountConsistency();
176 } 176 }
177 177
178 std::string ChromeSigninClient::GetProductVersion() { 178 std::string ChromeSigninClient::GetProductVersion() {
179 chrome::VersionInfo chrome_version; 179 chrome::VersionInfo chrome_version;
180 if (!chrome_version.is_valid())
181 return "invalid";
182 return chrome_version.CreateVersionString(); 180 return chrome_version.CreateVersionString();
183 } 181 }
184 182
185 bool ChromeSigninClient::IsFirstRun() const { 183 bool ChromeSigninClient::IsFirstRun() const {
186 #if defined(OS_ANDROID) 184 #if defined(OS_ANDROID)
187 return false; 185 return false;
188 #else 186 #else
189 return first_run::IsChromeFirstRun(); 187 return first_run::IsChromeFirstRun();
190 #endif 188 #endif
191 } 189 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 if (!callbacks_.empty()) 242 if (!callbacks_.empty())
245 return; 243 return;
246 // Note that it's allowed to call this method multiple times without an 244 // Note that it's allowed to call this method multiple times without an
247 // intervening call to |RegisterForCookieChangedNotification()|. 245 // intervening call to |RegisterForCookieChangedNotification()|.
248 content::Source<Profile> source(profile_); 246 content::Source<Profile> source(profile_);
249 if (!registrar_.IsRegistered( 247 if (!registrar_.IsRegistered(
250 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) 248 this, chrome::NOTIFICATION_COOKIE_CHANGED, source))
251 return; 249 return;
252 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); 250 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source);
253 } 251 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/ui_thread_search_terms_data.cc ('k') | chrome/browser/sync/about_sync_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698