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

Side by Side Diff: remoting/host/plugin/policy_hack/nat_policy.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
« no previous file with comments | « remoting/host/json_host_config.cc ('k') | remoting/protocol/buffered_socket_writer.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Most of this code is copied from: 5 // Most of this code is copied from:
6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc} 6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc}
7 7
8 #include "remoting/host/plugin/policy_hack/nat_policy.h" 8 #include "remoting/host/plugin/policy_hack/nat_policy.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/location.h"
13 #include "base/memory/weak_ptr.h"
12 #include "base/message_loop_proxy.h" 14 #include "base/message_loop_proxy.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/synchronization/waitable_event.h" 15 #include "base/synchronization/waitable_event.h"
16 #include "base/time.h"
15 #include "base/values.h" 17 #include "base/values.h"
16 18
17 namespace remoting { 19 namespace remoting {
18 namespace policy_hack { 20 namespace policy_hack {
19 21
20 namespace { 22 namespace {
21 // The time interval for rechecking policy. This is our fallback in case the 23 // The time interval for rechecking policy. This is our fallback in case the
22 // delegate never reports a change to the ReloadObserver. 24 // delegate never reports a change to the ReloadObserver.
23 const int kFallbackReloadDelayMinutes = 15; 25 const int kFallbackReloadDelayMinutes = 15;
24 26
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (!first_state_published_ || 115 if (!first_state_published_ ||
114 (new_nat_enabled_state != current_nat_enabled_state_)) { 116 (new_nat_enabled_state != current_nat_enabled_state_)) {
115 first_state_published_ = true; 117 first_state_published_ = true;
116 current_nat_enabled_state_ = new_nat_enabled_state; 118 current_nat_enabled_state_ = new_nat_enabled_state;
117 nat_enabled_cb_.Run(current_nat_enabled_state_); 119 nat_enabled_cb_.Run(current_nat_enabled_state_);
118 } 120 }
119 } 121 }
120 122
121 } // namespace policy_hack 123 } // namespace policy_hack
122 } // namespace remoting 124 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/json_host_config.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698