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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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/shell_integration.cc ('k') | chrome/browser/shell_integration_mac.mm » ('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/shell_integration_linux.h" 5 #include "chrome/browser/shell_integration_linux.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #if defined(USE_GLIB) 9 #if defined(USE_GLIB)
10 #include <glib.h> 10 #include <glib.h>
(...skipping 24 matching lines...) Expand all
35 #include "base/process/kill.h" 35 #include "base/process/kill.h"
36 #include "base/process/launch.h" 36 #include "base/process/launch.h"
37 #include "base/strings/string_number_conversions.h" 37 #include "base/strings/string_number_conversions.h"
38 #include "base/strings/string_tokenizer.h" 38 #include "base/strings/string_tokenizer.h"
39 #include "base/strings/string_util.h" 39 #include "base/strings/string_util.h"
40 #include "base/strings/utf_string_conversions.h" 40 #include "base/strings/utf_string_conversions.h"
41 #include "base/threading/thread.h" 41 #include "base/threading/thread.h"
42 #include "base/threading/thread_restrictions.h" 42 #include "base/threading/thread_restrictions.h"
43 #include "build/build_config.h" 43 #include "build/build_config.h"
44 #include "chrome/browser/shell_integration.h" 44 #include "chrome/browser/shell_integration.h"
45 #include "chrome/common/channel_info.h"
45 #include "chrome/common/chrome_constants.h" 46 #include "chrome/common/chrome_constants.h"
46 #include "chrome/common/chrome_switches.h" 47 #include "chrome/common/chrome_switches.h"
47 #include "chrome/common/chrome_version_info.h" 48 #include "components/version_info/version_info.h"
48 #include "content/public/browser/browser_thread.h" 49 #include "content/public/browser/browser_thread.h"
49 #include "grit/chrome_unscaled_resources.h" 50 #include "grit/chrome_unscaled_resources.h"
50 #include "ui/base/resource/resource_bundle.h" 51 #include "ui/base/resource/resource_bundle.h"
51 #include "ui/gfx/image/image_family.h" 52 #include "ui/gfx/image/image_family.h"
52 #include "url/gurl.h" 53 #include "url/gurl.h"
53 54
54 using content::BrowserThread; 55 using content::BrowserThread;
55 56
56 namespace { 57 namespace {
57 58
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 const base::CommandLine* command_line = 580 const base::CommandLine* command_line =
580 base::CommandLine::ForCurrentProcess(); 581 base::CommandLine::ForCurrentProcess();
581 std::string class_name = command_line->GetProgram().BaseName().value(); 582 std::string class_name = command_line->GetProgram().BaseName().value();
582 if (!class_name.empty()) 583 if (!class_name.empty())
583 class_name[0] = base::ToUpperASCII(class_name[0]); 584 class_name[0] = base::ToUpperASCII(class_name[0]);
584 return class_name; 585 return class_name;
585 } 586 }
586 587
587 std::string GetDesktopName(base::Environment* env) { 588 std::string GetDesktopName(base::Environment* env) {
588 #if defined(GOOGLE_CHROME_BUILD) 589 #if defined(GOOGLE_CHROME_BUILD)
589 version_info::Channel product_channel( 590 version_info::Channel product_channel(chrome::GetChannel());
590 chrome::VersionInfo::GetChannel());
591 switch (product_channel) { 591 switch (product_channel) {
592 case version_info::Channel::DEV: 592 case version_info::Channel::DEV:
593 return "google-chrome-unstable.desktop"; 593 return "google-chrome-unstable.desktop";
594 case version_info::Channel::BETA: 594 case version_info::Channel::BETA:
595 return "google-chrome-beta.desktop"; 595 return "google-chrome-beta.desktop";
596 default: 596 default:
597 return "google-chrome.desktop"; 597 return "google-chrome.desktop";
598 } 598 }
599 #else // CHROMIUM_BUILD 599 #else // CHROMIUM_BUILD
600 // Allow $CHROME_DESKTOP to override the built-in value, so that development 600 // Allow $CHROME_DESKTOP to override the built-in value, so that development
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 base::FilePath applications_menu = GetDataWriteLocation(env.get()); 1055 base::FilePath applications_menu = GetDataWriteLocation(env.get());
1056 applications_menu = applications_menu.AppendASCII("applications"); 1056 applications_menu = applications_menu.AppendASCII("applications");
1057 std::vector<base::FilePath> shortcut_filenames_app_menu = 1057 std::vector<base::FilePath> shortcut_filenames_app_menu =
1058 GetExistingProfileShortcutFilenames(profile_path, applications_menu); 1058 GetExistingProfileShortcutFilenames(profile_path, applications_menu);
1059 for (const auto& menu : shortcut_filenames_app_menu) { 1059 for (const auto& menu : shortcut_filenames_app_menu) {
1060 DeleteShortcutInApplicationsMenu(menu, base::FilePath(kDirectoryFilename)); 1060 DeleteShortcutInApplicationsMenu(menu, base::FilePath(kDirectoryFilename));
1061 } 1061 }
1062 } 1062 }
1063 1063
1064 } // namespace shell_integration_linux 1064 } // namespace shell_integration_linux
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration.cc ('k') | chrome/browser/shell_integration_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698