• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 
5 #include "tests/cefclient/browser/main_context_impl.h"
6 
7 #include <unistd.h>
8 
9 namespace client {
10 
GetDownloadPath(const std::string & file_name)11 std::string MainContextImpl::GetDownloadPath(const std::string& file_name) {
12   return std::string();
13 }
14 
GetAppWorkingDirectory()15 std::string MainContextImpl::GetAppWorkingDirectory() {
16   char szWorkingDir[256];
17   if (getcwd(szWorkingDir, sizeof(szWorkingDir) - 1) == nullptr) {
18     szWorkingDir[0] = 0;
19   } else {
20     // Add trailing path separator.
21     size_t len = strlen(szWorkingDir);
22     szWorkingDir[len] = '/';
23     szWorkingDir[len + 1] = 0;
24   }
25   return szWorkingDir;
26 }
27 
28 }  // namespace client
29