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

Side by Side Diff: mojo/shell/loader.cc

Issue 292743017: Cleanup: Use base::CommandLine in mojo/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | « mojo/shell/dynamic_service_loader.cc ('k') | mojo/shell/run.cc » ('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 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
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
OLDNEW
« no previous file with comments | « mojo/shell/dynamic_service_loader.cc ('k') | mojo/shell/run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698