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

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

Issue 2714543006: Clean Obsolete HTTP Data from the Password Store (Closed)
Patch Set: Actually do the deletion. Created 3 years, 10 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 (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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/environment.h" 11 #include "base/environment.h"
12 #include "base/metrics/histogram_macros.h" 12 #include "base/metrics/histogram_macros.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/password_manager/password_manager_util.h"
16 #include "chrome/browser/profiles/incognito_helpers.h" 17 #include "chrome/browser/profiles/incognito_helpers.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/sync/glue/sync_start_util.h" 19 #include "chrome/browser/sync/glue/sync_start_util.h"
19 #include "chrome/browser/sync/profile_sync_service_factory.h" 20 #include "chrome/browser/sync/profile_sync_service_factory.h"
20 #include "chrome/browser/web_data_service_factory.h" 21 #include "chrome/browser/web_data_service_factory.h"
21 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
22 #include "components/browser_sync/profile_sync_service.h" 23 #include "components/browser_sync/profile_sync_service.h"
23 #include "components/keyed_service/content/browser_context_dependency_manager.h" 24 #include "components/keyed_service/content/browser_context_dependency_manager.h"
24 #include "components/os_crypt/os_crypt_switches.h" 25 #include "components/os_crypt/os_crypt_switches.h"
25 #include "components/password_manager/core/browser/login_database.h" 26 #include "components/password_manager/core/browser/login_database.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 143 }
143 #endif 144 #endif
144 145
145 scoped_refptr<RefcountedKeyedService> 146 scoped_refptr<RefcountedKeyedService>
146 PasswordStoreFactory::BuildServiceInstanceFor( 147 PasswordStoreFactory::BuildServiceInstanceFor(
147 content::BrowserContext* context) const { 148 content::BrowserContext* context) const {
148 #if defined(OS_WIN) 149 #if defined(OS_WIN)
149 password_manager_util_win::DelayReportOsPassword(); 150 password_manager_util_win::DelayReportOsPassword();
150 #endif 151 #endif
151 Profile* profile = static_cast<Profile*>(context); 152 Profile* profile = static_cast<Profile*>(context);
153 password_manager_util::DelayCleanObsoleteHttpDataForProfile(profile);
152 154
153 std::unique_ptr<password_manager::LoginDatabase> login_db( 155 std::unique_ptr<password_manager::LoginDatabase> login_db(
154 password_manager::CreateLoginDatabase(profile->GetPath())); 156 password_manager::CreateLoginDatabase(profile->GetPath()));
155 157
156 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner( 158 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner(
157 base::ThreadTaskRunnerHandle::Get()); 159 base::ThreadTaskRunnerHandle::Get());
158 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner( 160 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner(
159 content::BrowserThread::GetTaskRunnerForThread( 161 content::BrowserThread::GetTaskRunnerForThread(
160 content::BrowserThread::DB)); 162 content::BrowserThread::DB));
161 163
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 break; 351 break;
350 case LIBSECRET: 352 case LIBSECRET:
351 usage = OTHER_LIBSECRET; 353 usage = OTHER_LIBSECRET;
352 break; 354 break;
353 } 355 }
354 } 356 }
355 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, 357 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage,
356 MAX_BACKEND_USAGE_VALUE); 358 MAX_BACKEND_USAGE_VALUE);
357 } 359 }
358 #endif 360 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698