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

Side by Side Diff: chrome/browser/shell_integration_linux.cc

Issue 137393008: linux_aura: Port the linux first run dialog to aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw comments Created 6 years, 11 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 | Annotate | Revision Log
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/shell_integration_linux.h" 5 #include "chrome/browser/shell_integration_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <glib.h> 8 #include <glib.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // tweaked the script, but still allows our copy to be used if the script on the 332 // tweaked the script, but still allows our copy to be used if the script on the
333 // system fails, as the system copy may be missing capabilities of the Chrome 333 // system fails, as the system copy may be missing capabilities of the Chrome
334 // copy. 334 // copy.
335 335
336 // If |protocol| is empty this function sets Chrome as the default browser, 336 // If |protocol| is empty this function sets Chrome as the default browser,
337 // otherwise it sets Chrome as the default handler application for |protocol|. 337 // otherwise it sets Chrome as the default handler application for |protocol|.
338 bool SetDefaultWebClient(const std::string& protocol) { 338 bool SetDefaultWebClient(const std::string& protocol) {
339 #if defined(OS_CHROMEOS) 339 #if defined(OS_CHROMEOS)
340 return true; 340 return true;
341 #else 341 #else
342 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
343
344 scoped_ptr<base::Environment> env(base::Environment::Create()); 342 scoped_ptr<base::Environment> env(base::Environment::Create());
345 343
346 std::vector<std::string> argv; 344 std::vector<std::string> argv;
347 argv.push_back(kXdgSettings); 345 argv.push_back(kXdgSettings);
348 argv.push_back("set"); 346 argv.push_back("set");
349 if (protocol.empty()) { 347 if (protocol.empty()) {
350 argv.push_back(kXdgSettingsDefaultBrowser); 348 argv.push_back(kXdgSettingsDefaultBrowser);
351 } else { 349 } else {
352 argv.push_back(kXdgSettingsDefaultSchemeHandler); 350 argv.push_back(kXdgSettingsDefaultSchemeHandler);
353 argv.push_back(protocol); 351 argv.push_back(protocol);
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 for (std::vector<base::FilePath>::const_iterator it = 966 for (std::vector<base::FilePath>::const_iterator it =
969 shortcut_filenames_app_menu.begin(); 967 shortcut_filenames_app_menu.begin();
970 it != shortcut_filenames_app_menu.end(); ++it) { 968 it != shortcut_filenames_app_menu.end(); ++it) {
971 DeleteShortcutInApplicationsMenu(*it, 969 DeleteShortcutInApplicationsMenu(*it,
972 base::FilePath(kDirectoryFilename)); 970 base::FilePath(kDirectoryFilename));
973 } 971 }
974 } 972 }
975 } 973 }
976 974
977 } // namespace ShellIntegrationLinux 975 } // namespace ShellIntegrationLinux
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698