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

Side by Side Diff: chrome/browser/extensions/file_manager_util.cc

Issue 7745021: Do not show "Translate to ..." item in context menu for chrome:// and FileBrowser pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
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 #include "chrome/browser/extensions/file_manager_util.h" 4 #include "chrome/browser/extensions/file_manager_util.h"
5 5
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/chromeos/media/media_player.h" 12 #include "chrome/browser/chromeos/media/media_player.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/simple_message_box.h" 14 #include "chrome/browser/simple_message_box.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_list.h" 16 #include "chrome/browser/ui/browser_list.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "content/browser/browser_thread.h" 18 #include "content/browser/browser_thread.h"
19 #include "content/browser/user_metrics.h" 19 #include "content/browser/user_metrics.h"
20 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
21 #include "net/base/escape.h" 21 #include "net/base/escape.h"
22 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 #include "webkit/fileapi/file_system_context.h" 23 #include "webkit/fileapi/file_system_context.h"
24 #include "webkit/fileapi/file_system_mount_point_provider.h" 24 #include "webkit/fileapi/file_system_mount_point_provider.h"
25 #include "webkit/fileapi/file_system_util.h" 25 #include "webkit/fileapi/file_system_util.h"
26 26
27 #define FILEBROWSER_DOMAIN "hhaomjibdihmijegdhdafkllkbggdgoj"
28 const char kFileBrowserDomain[] = FILEBROWSER_DOMAIN;
27 #define FILEBROWSER_URL(PATH) \ 29 #define FILEBROWSER_URL(PATH) \
28 ("chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/" PATH) 30 ("chrome-extension://" FILEBROWSER_DOMAIN "/" PATH)
29 // This is the "well known" url for the file manager extension from 31 // This is the "well known" url for the file manager extension from
30 // browser/resources/file_manager. In the future we may provide a way to swap 32 // browser/resources/file_manager. In the future we may provide a way to swap
31 // out this file manager for an aftermarket part, but not yet. 33 // out this file manager for an aftermarket part, but not yet.
32 const char kFileBrowserExtensionUrl[] = FILEBROWSER_URL(""); 34 const char kFileBrowserExtensionUrl[] = FILEBROWSER_URL("");
33 const char kBaseFileBrowserUrl[] = FILEBROWSER_URL("main.html"); 35 const char kBaseFileBrowserUrl[] = FILEBROWSER_URL("main.html");
34 const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html"); 36 const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html");
35 const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html"); 37 const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html");
36 #undef FILEBROWSER_URL 38 #undef FILEBROWSER_URL
37 39
38 // List of file extension we can open in tab. 40 // List of file extension we can open in tab.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 case SelectFileDialog::SELECT_OPEN_MULTI_FILE: 293 case SelectFileDialog::SELECT_OPEN_MULTI_FILE:
292 type_str = "open-multi-file"; 294 type_str = "open-multi-file";
293 break; 295 break;
294 296
295 default: 297 default:
296 NOTREACHED(); 298 NOTREACHED();
297 } 299 }
298 300
299 return type_str; 301 return type_str;
300 } 302 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698