Get us compiling on Win32
authorPaul Betts <paul@paulbetts.org>
Mon, 23 Jan 2017 22:49:18 +0000 (14:49 -0800)
committerdeepak1556 <hop2deep@gmail.com>
Mon, 13 Mar 2017 18:56:27 +0000 (00:26 +0530)
atom/browser/ui/webui/pdf_viewer_handler.h
atom/browser/ui/webui/pdf_viewer_ui.cc
atom/browser/ui/webui/pdf_viewer_ui.h

index f9f626e..a061cb8 100644 (file)
@@ -16,7 +16,7 @@ class ListValue;
 }
 
 namespace content {
-class StreamInfo;
+struct StreamInfo;
 }
 
 namespace atom {
index 4757e56..4738a71 100644 (file)
@@ -49,7 +49,8 @@ class BundledDataSource : public content::URLDataSource {
                         const GotDataCallback& callback) override {
     std::string filename = PathWithoutParams(path);
     std::map<base::FilePath, int>::const_iterator entry =
-        path_to_resource_id_.find(base::FilePath(filename));
+        path_to_resource_id_.find(base::FilePath::FromUTF8Unsafe(filename));
+
     if (entry != path_to_resource_id_.end()) {
       int resource_id = entry->second;
       const ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
@@ -60,7 +61,7 @@ class BundledDataSource : public content::URLDataSource {
   std::string GetMimeType(const std::string& path) const override {
     std::string filename = PathWithoutParams(path);
     std::string mime_type;
-    net::GetMimeTypeFromFile(base::FilePath(filename), &mime_type);
+    net::GetMimeTypeFromFile(base::FilePath::FromUTF8Unsafe(filename), &mime_type);
     return mime_type;
   }
 
index bc3bebf..6e76ca8 100644 (file)
@@ -14,7 +14,7 @@
 
 namespace content {
 class BrowserContext;
-class StreamInfo;
+struct StreamInfo;
 }
 
 namespace atom {