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

Side by Side Diff: chrome/browser/password_manager/password_store_factory.cc

Issue 383083009: [Password Manager] Fix crash in reporting sync stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 5 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 | Annotate | Revision Log
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/password_manager/password_store_factory.h" 5 #include "chrome/browser/password_manager/password_store_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/password_manager/sync_metrics.h" 10 #include "chrome/browser/password_manager/sync_metrics.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 db_thread_runner, 221 db_thread_runner,
222 login_db.release(), 222 login_db.release(),
223 backend.release()); 223 backend.release());
224 #elif defined(USE_OZONE) 224 #elif defined(USE_OZONE)
225 ps = new password_manager::PasswordStoreDefault( 225 ps = new password_manager::PasswordStoreDefault(
226 main_thread_runner, db_thread_runner, login_db.release()); 226 main_thread_runner, db_thread_runner, login_db.release());
227 #else 227 #else
228 NOTIMPLEMENTED(); 228 NOTIMPLEMENTED();
229 #endif 229 #endif
230 std::string sync_username = 230 std::string sync_username =
231 password_manager_sync_metrics::GetPasswordSyncUsername(profile); 231 password_manager_sync_metrics::GetSyncUsername(profile);
232 if (!ps || !ps->Init( 232 if (!ps || !ps->Init(
233 sync_start_util::GetFlareForSyncableService(profile->GetPath()), 233 sync_start_util::GetFlareForSyncableService(profile->GetPath()),
234 sync_username)) { 234 sync_username)) {
235 NOTREACHED() << "Could not initialize password manager."; 235 NOTREACHED() << "Could not initialize password manager.";
236 return NULL; 236 return NULL;
237 } 237 }
238 238
239 return new PasswordStoreService(ps); 239 return new PasswordStoreService(ps);
240 } 240 }
241 241
(...skipping 10 matching lines...) Expand all
252 } 252 }
253 253
254 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse( 254 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse(
255 content::BrowserContext* context) const { 255 content::BrowserContext* context) const {
256 return chrome::GetBrowserContextRedirectedInIncognito(context); 256 return chrome::GetBrowserContextRedirectedInIncognito(context);
257 } 257 }
258 258
259 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { 259 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const {
260 return true; 260 return true;
261 } 261 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/chrome_password_manager_client.cc ('k') | chrome/browser/password_manager/sync_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698