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

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

Issue 141703022: Support for file listing in privet local filesystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/local_discovery/storage/path_util.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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 #endif 235 #endif
236 236
237 #if defined(USE_X11) 237 #if defined(USE_X11)
238 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" 238 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h"
239 #endif 239 #endif
240 240
241 #if defined(ENABLE_SPELLCHECK) 241 #if defined(ENABLE_SPELLCHECK)
242 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" 242 #include "chrome/browser/spellchecker/spellcheck_message_filter.h"
243 #endif 243 #endif
244 244
245
246 #if defined(ENABLE_MDNS)
247 #include "chrome/browser/local_discovery/storage/privet_filesystem_backend.h"
248 #endif
249
245 using blink::WebWindowFeatures; 250 using blink::WebWindowFeatures;
246 using base::FileDescriptor; 251 using base::FileDescriptor;
247 using content::AccessTokenStore; 252 using content::AccessTokenStore;
248 using content::BrowserChildProcessHostIterator; 253 using content::BrowserChildProcessHostIterator;
249 using content::BrowserThread; 254 using content::BrowserThread;
250 using content::BrowserURLHandler; 255 using content::BrowserURLHandler;
251 using content::ChildProcessSecurityPolicy; 256 using content::ChildProcessSecurityPolicy;
252 using content::FileDescriptorInfo; 257 using content::FileDescriptorInfo;
253 using content::QuotaPermissionContext; 258 using content::QuotaPermissionContext;
254 using content::RenderViewHost; 259 using content::RenderViewHost;
(...skipping 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 fileapi::ExternalMountPoints::GetSystemInstance()); 2572 fileapi::ExternalMountPoints::GetSystemInstance());
2568 backend->AddSystemMountPoints(); 2573 backend->AddSystemMountPoints();
2569 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); 2574 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal));
2570 additional_backends->push_back(backend); 2575 additional_backends->push_back(backend);
2571 #endif 2576 #endif
2572 2577
2573 additional_backends->push_back( 2578 additional_backends->push_back(
2574 new sync_file_system::SyncFileSystemBackend( 2579 new sync_file_system::SyncFileSystemBackend(
2575 Profile::FromBrowserContext(browser_context))); 2580 Profile::FromBrowserContext(browser_context)));
2576 2581
2582 #if defined(ENABLE_MDNS)
2577 if (CommandLine::ForCurrentProcess()->HasSwitch( 2583 if (CommandLine::ForCurrentProcess()->HasSwitch(
2578 switches::kEnablePrivetStorage)) { 2584 switches::kEnablePrivetStorage)) {
2579 additional_backends->push_back( 2585 additional_backends->push_back(
2580 new local_discovery::PrivetFileSystemBackend( 2586 new local_discovery::PrivetFileSystemBackend(
2581 fileapi::ExternalMountPoints::GetSystemInstance())); 2587 fileapi::ExternalMountPoints::GetSystemInstance(),
2588 browser_context));
2582 } 2589 }
2590 #endif
2583 } 2591 }
2584 2592
2585 #if defined(OS_POSIX) && !defined(OS_MACOSX) 2593 #if defined(OS_POSIX) && !defined(OS_MACOSX)
2586 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 2594 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
2587 const CommandLine& command_line, 2595 const CommandLine& command_line,
2588 int child_process_id, 2596 int child_process_id,
2589 std::vector<FileDescriptorInfo>* mappings) { 2597 std::vector<FileDescriptorInfo>* mappings) {
2590 #if defined(OS_ANDROID) 2598 #if defined(OS_ANDROID)
2591 base::FilePath data_path; 2599 base::FilePath data_path;
2592 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); 2600 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2706 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 2714 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
2707 // Chromium builds as well. 2715 // Chromium builds as well.
2708 return channel <= chrome::VersionInfo::CHANNEL_DEV; 2716 return channel <= chrome::VersionInfo::CHANNEL_DEV;
2709 #else 2717 #else
2710 return false; 2718 return false;
2711 #endif 2719 #endif
2712 } 2720 }
2713 2721
2714 2722
2715 } // namespace chrome 2723 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/local_discovery/storage/path_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698