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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 598463002: Move --custom-launcher-page switch into app_list_switches.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | chrome/common/chrome_switches.h » ('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/app_list/app_list_view_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "apps/custom_launcher_page_contents.h" 9 #include "apps/custom_launcher_page_contents.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 // Gets a list of URLs of the custom launcher pages to show in the launcher. 110 // Gets a list of URLs of the custom launcher pages to show in the launcher.
111 // Returns a URL for each installed launcher page. If --custom-launcher-page is 111 // Returns a URL for each installed launcher page. If --custom-launcher-page is
112 // specified and valid, also includes that URL. 112 // specified and valid, also includes that URL.
113 void GetCustomLauncherPageUrls(content::BrowserContext* browser_context, 113 void GetCustomLauncherPageUrls(content::BrowserContext* browser_context,
114 std::vector<GURL>* urls) { 114 std::vector<GURL>* urls) {
115 // First, check the command line. 115 // First, check the command line.
116 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 116 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
117 if (app_list::switches::IsExperimentalAppListEnabled() && 117 if (app_list::switches::IsExperimentalAppListEnabled() &&
118 command_line->HasSwitch(switches::kCustomLauncherPage)) { 118 command_line->HasSwitch(app_list::switches::kCustomLauncherPage)) {
119 GURL custom_launcher_page_url( 119 GURL custom_launcher_page_url(command_line->GetSwitchValueASCII(
120 command_line->GetSwitchValueASCII(switches::kCustomLauncherPage)); 120 app_list::switches::kCustomLauncherPage));
121 121
122 if (custom_launcher_page_url.SchemeIs(extensions::kExtensionScheme)) { 122 if (custom_launcher_page_url.SchemeIs(extensions::kExtensionScheme)) {
123 urls->push_back(custom_launcher_page_url); 123 urls->push_back(custom_launcher_page_url);
124 } else { 124 } else {
125 LOG(ERROR) << "Invalid custom launcher page URL: " 125 LOG(ERROR) << "Invalid custom launcher page URL: "
126 << custom_launcher_page_url.possibly_invalid_spec(); 126 << custom_launcher_page_url.possibly_invalid_spec();
127 } 127 }
128 } 128 }
129 129
130 // Search the list of installed extensions for ones with 'launcher_page'. 130 // Search the list of installed extensions for ones with 'launcher_page'.
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 // SigninManagerFactory is not a leaky singleton (unlike this class), and 651 // SigninManagerFactory is not a leaky singleton (unlike this class), and
652 // its destructor will check that it has no remaining observers. 652 // its destructor will check that it has no remaining observers.
653 scoped_observer_.RemoveAll(); 653 scoped_observer_.RemoveAll();
654 SigninManagerFactory::GetInstance()->RemoveObserver(this); 654 SigninManagerFactory::GetInstance()->RemoveObserver(this);
655 break; 655 break;
656 default: 656 default:
657 NOTREACHED(); 657 NOTREACHED();
658 } 658 }
659 } 659 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698