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

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

Issue 10825121: Remove the need to have separate config for authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « remoting/host/composite_host_config.h ('k') | remoting/host/installer/chromoting.wxs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bool CompositeHostConfig::AddConfigPath(const FilePath& path) {
18 scoped_ptr<JsonHostConfig> config(new JsonHostConfig(path));
19 if (!config->Read()) {
20 return false;
21 }
22 configs_.push_back(config.release());
23 return true;
24 }
25
26 bool CompositeHostConfig::GetString(const std::string& path,
27 std::string* out_value) const {
28 for (std::vector<HostConfig*>::const_iterator it = configs_.begin();
29 it != configs_.end(); ++it) {
30 if ((*it)->GetString(path, out_value))
31 return true;
32 }
33 return false;
34 }
35
36 bool CompositeHostConfig::GetBoolean(const std::string& path,
37 bool* out_value) const {
38 for (std::vector<HostConfig*>::const_iterator it = configs_.begin();
39 it != configs_.end(); ++it) {
40 if ((*it)->GetBoolean(path, out_value))
41 return true;
42 }
43 return false;
44 }
45
46 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/composite_host_config.h ('k') | remoting/host/installer/chromoting.wxs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698