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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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/ui/passwords/manage_passwords_ui_controller.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browsing_data/browsing_data_helper.h" 8 #include "chrome/browser/browsing_data/browsing_data_helper.h"
9 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 9 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
10 #include "chrome/browser/password_manager/password_store_factory.h" 10 #include "chrome/browser/password_manager/password_store_factory.h"
(...skipping 17 matching lines...) Expand all
28 28
29 using autofill::PasswordFormMap; 29 using autofill::PasswordFormMap;
30 using password_manager::PasswordFormManager; 30 using password_manager::PasswordFormManager;
31 31
32 namespace { 32 namespace {
33 33
34 password_manager::PasswordStore* GetPasswordStore( 34 password_manager::PasswordStore* GetPasswordStore(
35 content::WebContents* web_contents) { 35 content::WebContents* web_contents) {
36 return PasswordStoreFactory::GetForProfile( 36 return PasswordStoreFactory::GetForProfile(
37 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 37 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
38 Profile::EXPLICIT_ACCESS).get(); 38 ServiceAccessType::EXPLICIT_ACCESS).get();
39 } 39 }
40 40
41 autofill::ConstPasswordFormMap ConstifyMap( 41 autofill::ConstPasswordFormMap ConstifyMap(
42 const autofill::PasswordFormMap& map) { 42 const autofill::PasswordFormMap& map) {
43 autofill::ConstPasswordFormMap ret; 43 autofill::ConstPasswordFormMap ret;
44 ret.insert(map.begin(), map.end()); 44 ret.insert(map.begin(), map.end());
45 return ret; 45 return ret;
46 } 46 }
47 47
48 // Performs a deep copy of the PasswordForm pointers in |map|. The resulting map 48 // Performs a deep copy of the PasswordForm pointers in |map|. The resulting map
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 bool ManagePasswordsUIController::PasswordPendingUserDecision() const { 352 bool ManagePasswordsUIController::PasswordPendingUserDecision() const {
353 return password_manager::ui::IsPendingState(state_); 353 return password_manager::ui::IsPendingState(state_);
354 } 354 }
355 355
356 void ManagePasswordsUIController::WebContentsDestroyed() { 356 void ManagePasswordsUIController::WebContentsDestroyed() {
357 password_manager::PasswordStore* password_store = 357 password_manager::PasswordStore* password_store =
358 GetPasswordStore(web_contents()); 358 GetPasswordStore(web_contents());
359 if (password_store) 359 if (password_store)
360 password_store->RemoveObserver(this); 360 password_store->RemoveObserver(this);
361 } 361 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698