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 "shell/context.h" | 5 #include "shell/context.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 ~Setup() {} | 59 ~Setup() {} |
60 | 60 |
61 private: | 61 private: |
62 DISALLOW_COPY_AND_ASSIGN(Setup); | 62 DISALLOW_COPY_AND_ASSIGN(Setup); |
63 }; | 63 }; |
64 | 64 |
65 ApplicationManager::Options MakeApplicationManagerOptions() { | 65 ApplicationManager::Options MakeApplicationManagerOptions() { |
66 ApplicationManager::Options options; | 66 ApplicationManager::Options options; |
67 options.disable_cache = base::CommandLine::ForCurrentProcess()->HasSwitch( | 67 options.disable_cache = base::CommandLine::ForCurrentProcess()->HasSwitch( |
68 switches::kDisableCache); | 68 switches::kDisableCache); |
| 69 options.force_offline_by_default = |
| 70 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 71 switches::kForceOfflineByDefault); |
69 return options; | 72 return options; |
70 } | 73 } |
71 | 74 |
72 bool ConfigureURLMappings(const base::CommandLine& command_line, | 75 bool ConfigureURLMappings(const base::CommandLine& command_line, |
73 Context* context) { | 76 Context* context) { |
74 URLResolver* resolver = context->url_resolver(); | 77 URLResolver* resolver = context->url_resolver(); |
75 | 78 |
76 // Configure the resolution of unknown mojo: URLs. | 79 // Configure the resolution of unknown mojo: URLs. |
77 GURL base_url; | 80 GURL base_url; |
78 if (command_line.HasSwitch(switches::kOrigin)) | 81 if (command_line.HasSwitch(switches::kOrigin)) |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 app_urls_.erase(url); | 375 app_urls_.erase(url); |
373 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { | 376 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { |
374 DCHECK_EQ(base::MessageLoop::current()->task_runner(), | 377 DCHECK_EQ(base::MessageLoop::current()->task_runner(), |
375 task_runners_->shell_runner()); | 378 task_runners_->shell_runner()); |
376 base::MessageLoop::current()->Quit(); | 379 base::MessageLoop::current()->Quit(); |
377 } | 380 } |
378 } | 381 } |
379 } | 382 } |
380 | 383 |
381 } // namespace shell | 384 } // namespace shell |
OLD | NEW |