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

Side by Side Diff: chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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/webui/password_manager_internals/password_manager_in ternals_ui.h" 5 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in ternals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 // Reset the first run experience for auto sign-in if the user opened 82 // Reset the first run experience for auto sign-in if the user opened
83 // chrome://password-manager-internals/?reset_fre . 83 // chrome://password-manager-internals/?reset_fre .
84 // TODO(crbug.com/599454) This may be removed in M53, when the credential 84 // TODO(crbug.com/599454) This may be removed in M53, when the credential
85 // manager API has been launched to stable. 85 // manager API has been launched to stable.
86 GURL url = web_ui()->GetWebContents()->GetVisibleURL(); 86 GURL url = web_ui()->GetWebContents()->GetVisibleURL();
87 if (url.is_valid() && url.has_query()) { 87 if (url.is_valid() && url.has_query()) {
88 std::vector<std::string> query_parameters = base::SplitString( 88 std::vector<std::string> query_parameters = base::SplitString(
89 url.query(), "&", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL); 89 url.query(), "&", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
90 if (ContainsValue(query_parameters, "reset_fre")) 90 if (base::ContainsValue(query_parameters, "reset_fre"))
91 ResetAutoSignInFirstRunExperience(); 91 ResetAutoSignInFirstRunExperience();
92 } 92 }
93 } 93 }
94 94
95 void PasswordManagerInternalsUI::LogSavePasswordProgress( 95 void PasswordManagerInternalsUI::LogSavePasswordProgress(
96 const std::string& text) { 96 const std::string& text) {
97 if (!registered_with_logging_service_ || text.empty()) 97 if (!registered_with_logging_service_ || text.empty())
98 return; 98 return;
99 std::string no_quotes(text); 99 std::string no_quotes(text);
100 std::replace(no_quotes.begin(), no_quotes.end(), '"', ' '); 100 std::replace(no_quotes.begin(), no_quotes.end(), '"', ' ');
(...skipping 19 matching lines...) Expand all
120 profile->GetPrefs()->SetBoolean( 120 profile->GetPrefs()->SetBoolean(
121 password_manager::prefs::kWasAutoSignInFirstRunExperienceShown, false); 121 password_manager::prefs::kWasAutoSignInFirstRunExperienceShown, false);
122 122
123 PasswordManagerInternalsService* service = 123 PasswordManagerInternalsService* service =
124 PasswordManagerInternalsServiceFactory::GetForBrowserContext( 124 PasswordManagerInternalsServiceFactory::GetForBrowserContext(
125 Profile::FromWebUI(web_ui())); 125 Profile::FromWebUI(web_ui()));
126 if (service) 126 if (service)
127 service->ProcessLog("Reset auto sign-in first run experience: yes"); 127 service->ProcessLog("Reset auto sign-in first run experience: yes");
128 } 128 }
129 } 129 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.cc ('k') | chrome/browser/ui/webui/uber/uber_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698