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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_bubble_model.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/prefs/pref_service.h"
14 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
15 #include "base/time/default_clock.h" 14 #include "base/time/default_clock.h"
16 #include "chrome/browser/password_manager/password_store_factory.h" 15 #include "chrome/browser/password_manager/password_store_factory.h"
17 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/sync/profile_sync_service_factory.h" 17 #include "chrome/browser/sync/profile_sync_service_factory.h"
19 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" 18 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
20 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" 19 #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
21 #include "chrome/grit/chromium_strings.h" 20 #include "chrome/grit/chromium_strings.h"
22 #include "chrome/grit/generated_resources.h" 21 #include "chrome/grit/generated_resources.h"
23 #include "components/browser_sync/browser/profile_sync_service.h" 22 #include "components/browser_sync/browser/profile_sync_service.h"
24 #include "components/password_manager/core/browser/password_bubble_experiment.h" 23 #include "components/password_manager/core/browser/password_bubble_experiment.h"
25 #include "components/password_manager/core/browser/password_manager_constants.h" 24 #include "components/password_manager/core/browser/password_manager_constants.h"
26 #include "components/password_manager/core/browser/password_store.h" 25 #include "components/password_manager/core/browser/password_store.h"
27 #include "components/password_manager/core/common/password_manager_pref_names.h" 26 #include "components/password_manager/core/common/password_manager_pref_names.h"
28 #include "components/password_manager/core/common/password_manager_ui.h" 27 #include "components/password_manager/core/common/password_manager_ui.h"
28 #include "components/prefs/pref_service.h"
29 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
30 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
31 31
32 namespace metrics_util = password_manager::metrics_util; 32 namespace metrics_util = password_manager::metrics_util;
33 33
34 namespace { 34 namespace {
35 35
36 Profile* GetProfileFromWebContents(content::WebContents* web_contents) { 36 Profile* GetProfileFromWebContents(content::WebContents* web_contents) {
37 if (!web_contents) 37 if (!web_contents)
38 return nullptr; 38 return nullptr;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 return metrics_util::NO_UPDATE_SUBMISSION; 395 return metrics_util::NO_UPDATE_SUBMISSION;
396 } 396 }
397 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) 397 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE)
398 return metrics_util::NO_UPDATE_SUBMISSION; 398 return metrics_util::NO_UPDATE_SUBMISSION;
399 if (password_overridden_) 399 if (password_overridden_)
400 return update_events[3][behavior]; 400 return update_events[3][behavior];
401 if (ShouldShowMultipleAccountUpdateUI()) 401 if (ShouldShowMultipleAccountUpdateUI())
402 return update_events[2][behavior]; 402 return update_events[2][behavior];
403 return update_events[1][behavior]; 403 return update_events[1][behavior];
404 } 404 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698