OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/shell/loader.h" | 5 #include "mojo/shell/loader.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "mojo/shell/switches.h" | 10 #include "mojo/shell/switches.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 base::FilePath tmp_dir; | 70 base::FilePath tmp_dir; |
71 base::GetTempDir(&tmp_dir); | 71 base::GetTempDir(&tmp_dir); |
72 // If MOJO_SHELL_DEBUG is set we want to dowload to a well known location. | 72 // If MOJO_SHELL_DEBUG is set we want to dowload to a well known location. |
73 // This makes it easier to do the necessary links so that symbols are found. | 73 // This makes it easier to do the necessary links so that symbols are found. |
74 job->fetcher_->SaveResponseToFileAtPath( | 74 job->fetcher_->SaveResponseToFileAtPath( |
75 tmp_dir.Append("link-me"), | 75 tmp_dir.Append("link-me"), |
76 file_runner_.get()); | 76 file_runner_.get()); |
77 #else | 77 #else |
78 job->fetcher_->SaveResponseToTemporaryFile(file_runner_.get()); | 78 job->fetcher_->SaveResponseToTemporaryFile(file_runner_.get()); |
79 #endif | 79 #endif |
80 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableCache)) | 80 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 81 switches::kDisableCache)) |
81 job->fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE); | 82 job->fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE); |
82 job->fetcher_->Start(); | 83 job->fetcher_->Start(); |
83 return job.Pass(); | 84 return job.Pass(); |
84 } | 85 } |
85 | 86 |
86 } // namespace shell | 87 } // namespace shell |
87 } // namespace mojo | 88 } // namespace mojo |
OLD | NEW |