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

Side by Side Diff: chrome/browser/ui/chrome_pages.cc

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/browser_window_state.cc ('k') | chrome/browser/ui/webui/instant_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 const std::string& scheme) { 276 const std::string& scheme) {
277 if (!browser->is_type_popup() || !browser->is_trusted_source()) 277 if (!browser->is_type_popup() || !browser->is_trusted_source())
278 return false; 278 return false;
279 if (scheme.empty()) // Any trusted popup window 279 if (scheme.empty()) // Any trusted popup window
280 return true; 280 return true;
281 const content::WebContents* web_contents = 281 const content::WebContents* web_contents =
282 browser->tab_strip_model()->GetWebContentsAt(0); 282 browser->tab_strip_model()->GetWebContentsAt(0);
283 if (!web_contents) 283 if (!web_contents)
284 return false; 284 return false;
285 GURL url(web_contents->GetURL()); 285 GURL url(web_contents->GetURL());
286 return url.SchemeIs(scheme.c_str()); 286 return url.SchemeIs(scheme);
287 } 287 }
288 288
289 289
290 void ShowSettings(Browser* browser) { 290 void ShowSettings(Browser* browser) {
291 ShowSettingsSubPage(browser, std::string()); 291 ShowSettingsSubPage(browser, std::string());
292 } 292 }
293 293
294 void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) { 294 void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) {
295 if (::switches::SettingsWindowEnabled()) { 295 if (::switches::SettingsWindowEnabled()) {
296 ShowSettingsSubPageForProfile(browser->profile(), sub_page); 296 ShowSettingsSubPageForProfile(browser->profile(), sub_page);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 SigninManagerFactory::GetForProfile(original_profile); 455 SigninManagerFactory::GetForProfile(original_profile);
456 DCHECK(manager->IsSigninAllowed()); 456 DCHECK(manager->IsSigninAllowed());
457 if (manager->IsAuthenticated()) 457 if (manager->IsAuthenticated())
458 ShowSettings(browser); 458 ShowSettings(browser);
459 else 459 else
460 ShowBrowserSignin(browser, access_point); 460 ShowBrowserSignin(browser, access_point);
461 } 461 }
462 #endif 462 #endif
463 463
464 } // namespace chrome 464 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_window_state.cc ('k') | chrome/browser/ui/webui/instant_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698