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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/shell_integration.cc ('k') | chrome/browser/shell_integration_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "chrome/browser/shell_integration.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 20 matching lines...) Expand all
31 #include "base/threading/thread.h" 31 #include "base/threading/thread.h"
32 #include "base/utf_string_conversions.h" 32 #include "base/utf_string_conversions.h"
33 #include "build/build_config.h" 33 #include "build/build_config.h"
34 #include "chrome/browser/web_applications/web_app.h" 34 #include "chrome/browser/web_applications/web_app.h"
35 #include "chrome/common/chrome_constants.h" 35 #include "chrome/common/chrome_constants.h"
36 #include "chrome/common/chrome_paths.h" 36 #include "chrome/common/chrome_paths.h"
37 #include "content/public/browser/browser_thread.h" 37 #include "content/public/browser/browser_thread.h"
38 #include "googleurl/src/gurl.h" 38 #include "googleurl/src/gurl.h"
39 #include "ui/gfx/codec/png_codec.h" 39 #include "ui/gfx/codec/png_codec.h"
40 40
41 using content::BrowserThread;
42
41 namespace { 43 namespace {
42 44
43 // Helper to launch xdg scripts. We don't want them to ask any questions on the 45 // Helper to launch xdg scripts. We don't want them to ask any questions on the
44 // terminal etc. The function returns true if the utility launches and exits 46 // terminal etc. The function returns true if the utility launches and exits
45 // cleanly, in which case |exit_code| returns the utility's exit code. 47 // cleanly, in which case |exit_code| returns the utility's exit code.
46 bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) { 48 bool LaunchXdgUtility(const std::vector<std::string>& argv, int* exit_code) {
47 // xdg-settings internally runs xdg-mime, which uses mv to move newly-created 49 // xdg-settings internally runs xdg-mime, which uses mv to move newly-created
48 // files on top of originals after making changes to them. In the event that 50 // files on top of originals after making changes to them. In the event that
49 // the original files are owned by another user (e.g. root, which can happen 51 // the original files are owned by another user (e.g. root, which can happen
50 // if they are updated within sudo), mv will prompt the user to confirm if 52 // if they are updated within sudo), mv will prompt the user to confirm if
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 shortcut_info.extension_id, 603 shortcut_info.extension_id,
602 shortcut_info.title, 604 shortcut_info.title,
603 icon_name); 605 icon_name);
604 606
605 if (shortcut_info.create_on_desktop) 607 if (shortcut_info.create_on_desktop)
606 CreateShortcutOnDesktop(shortcut_filename, contents); 608 CreateShortcutOnDesktop(shortcut_filename, contents);
607 609
608 if (shortcut_info.create_in_applications_menu) 610 if (shortcut_info.create_in_applications_menu)
609 CreateShortcutInApplicationsMenu(shortcut_filename, contents); 611 CreateShortcutInApplicationsMenu(shortcut_filename, contents);
610 } 612 }
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration.cc ('k') | chrome/browser/shell_integration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698