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

Side by Side Diff: chrome/service/remoting/remoting_directory_service.cc

Issue 3153029: Resubmit r56600 - Start/stop service process when browser starts and stop (Closed)
Patch Set: Created 10 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/service/service_main.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) 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 <vector> 5 #include <vector>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/net/url_request_context_getter.h" 10 #include "chrome/common/net/url_request_context_getter.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void RemotingDirectoryService::OnURLFetchComplete( 68 void RemotingDirectoryService::OnURLFetchComplete(
69 const URLFetcher* source, 69 const URLFetcher* source,
70 const GURL& url, 70 const GURL& url,
71 const URLRequestStatus& status, 71 const URLRequestStatus& status,
72 int response_code, 72 int response_code,
73 const ResponseCookies& cookies, 73 const ResponseCookies& cookies,
74 const std::string& data) { 74 const std::string& data) {
75 // Destroy the fetcher after the response has been received. 75 // Destroy the fetcher after the response has been received.
76 fetcher_.reset(); 76 fetcher_.reset();
77 77
78 LOG(INFO) << "Remoting directory response: \n" << data.c_str(); 78 // TODO(hclam): Simply checking 200 status is not enough.
79
80 // TODO(hclam): Simply checking 200 status is not ennough.
81 if (response_code == 200) { 79 if (response_code == 200) {
82 client_->OnRemotingHostAdded(); 80 client_->OnRemotingHostAdded();
83 } else { 81 } else {
84 client_->OnRemotingDirectoryError(); 82 client_->OnRemotingDirectoryError();
85 } 83 }
86 } 84 }
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/service/service_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698