Appease the almighty linter

This commit is contained in:
Samuel Attard 2017-09-17 01:13:55 +10:00 committed by Cheng Zhao
parent d9359d8b6c
commit d1aded2831
3 changed files with 6 additions and 3 deletions

View file

@ -6,6 +6,7 @@
#define ATOM_BROWSER_API_ATOM_API_SESSION_H_ #define ATOM_BROWSER_API_ATOM_API_SESSION_H_
#include <string> #include <string>
#include <vector>
#include "atom/browser/api/trackable_object.h" #include "atom/browser/api/trackable_object.h"
#include "atom/browser/atom_blob_reader.h" #include "atom/browser/atom_blob_reader.h"

View file

@ -368,7 +368,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
const std::vector<base::string16>& labels); const std::vector<base::string16>& labels);
private: private:
uint32_t GetNextRequestId() { uint32_t GetNextRequestId() {
return ++request_id_; return ++request_id_;
} }

View file

@ -140,8 +140,11 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
} }
v8::Isolate* isolate = v8::Isolate::GetCurrent(); v8::Isolate* isolate = v8::Isolate::GetCurrent();
mate::Handle<atom::api::WebContents> api_web_contents = atom::api::WebContents::CreateFrom(isolate, web_contents); mate::Handle<atom::api::WebContents> api_web_contents =
for (auto preloadPath : atom::api::Session::CreateFrom(isolate, api_web_contents.get()->GetBrowserContext())->GetPreloads()) { atom::api::WebContents::CreateFrom(isolate, web_contents);
auto session = atom::api::Session::CreateFrom(
isolate, api_web_contents.get()->GetBrowserContext());
for (auto preloadPath : session->GetPreloads()) {
if (base::FilePath(preloadPath).IsAbsolute()) if (base::FilePath(preloadPath).IsAbsolute())
command_line->AppendSwitchNative(switches::kSessionPreloadScript, command_line->AppendSwitchNative(switches::kSessionPreloadScript,
preloadPath); preloadPath);