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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 query += extension_to_highlight; | 182 query += extension_to_highlight; |
183 replacements.SetQueryStr(query); | 183 replacements.SetQueryStr(query); |
184 params.url = params.url.ReplaceComponents(replacements); | 184 params.url = params.url.ReplaceComponents(replacements); |
185 } | 185 } |
186 ShowSingletonTabOverwritingNTP(browser, params); | 186 ShowSingletonTabOverwritingNTP(browser, params); |
187 } | 187 } |
188 | 188 |
189 void ShowConflicts(Browser* browser) { | 189 void ShowConflicts(Browser* browser) { |
190 #if defined(OS_WIN) | 190 #if defined(OS_WIN) |
191 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); | 191 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); |
192 if (model->modules_to_notify_about() > 0) { | 192 GURL conflict_url = model->GetConflictUrl(); |
193 GURL help_center_url = model->GetFirstNotableConflict(); | 193 if (conflict_url.is_valid()) { |
194 if (help_center_url.is_valid()) { | 194 ShowSingletonTab(browser, conflict_url); |
195 ShowSingletonTab(browser, help_center_url); | 195 model->AcknowledgeConflictNotification(); |
196 model->AcknowledgeConflictNotification(); | 196 return; |
197 return; | |
198 } | |
199 } | 197 } |
200 #endif | 198 #endif |
201 | 199 |
202 content::RecordAction(UserMetricsAction("AboutConflicts")); | 200 content::RecordAction(UserMetricsAction("AboutConflicts")); |
203 ShowSingletonTab(browser, GURL(kChromeUIConflictsURL)); | 201 ShowSingletonTab(browser, GURL(kChromeUIConflictsURL)); |
204 } | 202 } |
205 | 203 |
206 void ShowHelp(Browser* browser, HelpSource source) { | 204 void ShowHelp(Browser* browser, HelpSource source) { |
207 ShowHelpImpl(browser, browser->profile(), source); | 205 ShowHelpImpl(browser, browser->profile(), source); |
208 } | 206 } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 SigninManagerFactory::GetForProfile(original_profile); | 396 SigninManagerFactory::GetForProfile(original_profile); |
399 DCHECK(manager->IsSigninAllowed()); | 397 DCHECK(manager->IsSigninAllowed()); |
400 if (manager->IsAuthenticated()) | 398 if (manager->IsAuthenticated()) |
401 ShowSettings(browser); | 399 ShowSettings(browser); |
402 else | 400 else |
403 ShowBrowserSignin(browser, access_point); | 401 ShowBrowserSignin(browser, access_point); |
404 } | 402 } |
405 #endif | 403 #endif |
406 | 404 |
407 } // namespace chrome | 405 } // namespace chrome |
OLD | NEW |