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

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

Issue 7879006: Delete Tracked, and move Location to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 3 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "remoting/host/json_host_config.h" 5 #include "remoting/host/json_host_config.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/location.h"
10 #include "base/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
11 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
12 #include "base/task.h" 13 #include "base/task.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 15
15 namespace remoting { 16 namespace remoting {
16 17
17 JsonHostConfig::JsonHostConfig( 18 JsonHostConfig::JsonHostConfig(
18 const FilePath& filename, 19 const FilePath& filename,
19 base::MessageLoopProxy* file_message_loop_proxy) 20 base::MessageLoopProxy* file_message_loop_proxy)
(...skipping 28 matching lines...) Expand all
48 49
49 void JsonHostConfig::DoWrite() { 50 void JsonHostConfig::DoWrite() {
50 std::string file_content; 51 std::string file_content;
51 base::AutoLock auto_lock(lock_); 52 base::AutoLock auto_lock(lock_);
52 base::JSONWriter::Write(values_.get(), true, &file_content); 53 base::JSONWriter::Write(values_.get(), true, &file_content);
53 // TODO(sergeyu): Move ImportantFileWriter to base and use it here. 54 // TODO(sergeyu): Move ImportantFileWriter to base and use it here.
54 file_util::WriteFile(filename_, file_content.c_str(), file_content.size()); 55 file_util::WriteFile(filename_, file_content.c_str(), file_content.size());
55 } 56 }
56 57
57 } // namespace remoting 58 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_xmpp_proxy.cc ('k') | remoting/host/plugin/policy_hack/nat_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698