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

Side by Side Diff: remoting/host/composite_host_config.cc

Issue 10855249: [Chromoting] The daemon process now starts the networking process and passes the host configuration… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback and rebased on top of https://chromiumcodereview.appspot.com/10829467/ Created 8 years, 4 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/host/composite_host_config.h"
6
7 #include "remoting/host/json_host_config.h"
8
9 namespace remoting {
10
11 CompositeHostConfig::CompositeHostConfig() {
12 }
13
14 CompositeHostConfig::~CompositeHostConfig() {
15 }
16
17 void CompositeHostConfig::AddConfigPath(const FilePath& path) {
18 configs_.push_back(new JsonHostConfig(path));
19 }
20
21 bool CompositeHostConfig::Read() {
22 bool result = true;
23 for (ScopedVector<JsonHostConfig>::iterator it = configs_.begin();
24 it != configs_.end(); ++it) {
25 result = result && (*it)->Read();
26 }
27 return result;
28 }
29
30 bool CompositeHostConfig::GetString(const std::string& path,
31 std::string* out_value) const {
32 for (ScopedVector<JsonHostConfig>::const_iterator it = configs_.begin();
33 it != configs_.end(); ++it) {
34 if ((*it)->GetString(path, out_value))
35 return true;
36 }
37 return false;
38 }
39
40 bool CompositeHostConfig::GetBoolean(const std::string& path,
41 bool* out_value) const {
42 for (ScopedVector<JsonHostConfig>::const_iterator it = configs_.begin();
43 it != configs_.end(); ++it) {
44 if ((*it)->GetBoolean(path, out_value))
45 return true;
46 }
47 return false;
48 }
49
50 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698