OLD | NEW |
---|---|
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/ui/chrome_pages.h" | 5 #include "chrome/browser/ui/chrome_pages.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 query += extension_to_highlight; | 177 query += extension_to_highlight; |
178 replacements.SetQueryStr(query); | 178 replacements.SetQueryStr(query); |
179 params.url = params.url.ReplaceComponents(replacements); | 179 params.url = params.url.ReplaceComponents(replacements); |
180 } | 180 } |
181 ShowSingletonTabOverwritingNTP(browser, params); | 181 ShowSingletonTabOverwritingNTP(browser, params); |
182 } | 182 } |
183 | 183 |
184 void ShowConflicts(Browser* browser) { | 184 void ShowConflicts(Browser* browser) { |
185 #if defined(OS_WIN) | 185 #if defined(OS_WIN) |
186 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); | 186 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); |
187 if (model->modules_to_notify_about() > 0) { | 187 if (model->ShouldShowConflictWarning()) { |
188 GURL help_center_url = model->GetFirstNotableConflict(); | 188 GURL conflict_url = model->GetConflictUrl(); |
189 if (help_center_url.is_valid()) { | 189 if (conflict_url.is_valid()) { |
Peter Kasting
2016/08/05 00:10:08
I don't think the system should be set up so you n
chrisha
2016/08/12 19:04:40
Collapsed logic into GetConflictUrl.
| |
190 ShowSingletonTab(browser, help_center_url); | 190 ShowSingletonTab(browser, conflict_url); |
191 model->AcknowledgeConflictNotification(); | 191 model->AcknowledgeConflictNotification(); |
192 return; | 192 return; |
193 } | 193 } |
194 } | 194 } |
195 #endif | 195 #endif |
196 | 196 |
197 content::RecordAction(UserMetricsAction("AboutConflicts")); | 197 content::RecordAction(UserMetricsAction("AboutConflicts")); |
198 ShowSingletonTab(browser, GURL(kChromeUIConflictsURL)); | 198 ShowSingletonTab(browser, GURL(kChromeUIConflictsURL)); |
199 } | 199 } |
200 | 200 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
393 SigninManagerFactory::GetForProfile(original_profile); | 393 SigninManagerFactory::GetForProfile(original_profile); |
394 DCHECK(manager->IsSigninAllowed()); | 394 DCHECK(manager->IsSigninAllowed()); |
395 if (manager->IsAuthenticated()) | 395 if (manager->IsAuthenticated()) |
396 ShowSettings(browser); | 396 ShowSettings(browser); |
397 else | 397 else |
398 ShowBrowserSignin(browser, access_point); | 398 ShowBrowserSignin(browser, access_point); |
399 } | 399 } |
400 #endif | 400 #endif |
401 | 401 |
402 } // namespace chrome | 402 } // namespace chrome |
OLD | NEW |