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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 19737002: Enable sandbox in local discovery utility process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 IPC_END_MESSAGE_MAP() 144 IPC_END_MESSAGE_MAP()
145 145
146 for (Handlers::iterator it = handlers_.begin(); 146 for (Handlers::iterator it = handlers_.begin();
147 !handled && it != handlers_.end(); ++it) { 147 !handled && it != handlers_.end(); ++it) {
148 handled = (*it)->OnMessageReceived(message); 148 handled = (*it)->OnMessageReceived(message);
149 } 149 }
150 150
151 return handled; 151 return handled;
152 } 152 }
153 153
154 void ChromeContentUtilityClient::PreSandboxStartup() {
155 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup();
156 }
157
154 void ChromeContentUtilityClient::OnUnpackExtension( 158 void ChromeContentUtilityClient::OnUnpackExtension(
155 const base::FilePath& extension_path, 159 const base::FilePath& extension_path,
156 const std::string& extension_id, 160 const std::string& extension_id,
157 int location, 161 int location,
158 int creation_flags) { 162 int creation_flags) {
159 CHECK_GT(location, extensions::Manifest::INVALID_LOCATION); 163 CHECK_GT(location, extensions::Manifest::INVALID_LOCATION);
160 CHECK_LT(location, extensions::Manifest::NUM_LOCATIONS); 164 CHECK_LT(location, extensions::Manifest::NUM_LOCATIONS);
161 extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate( 165 extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate(
162 extensions::ChromeAPIPermissions()); 166 extensions::ChromeAPIPermissions());
163 extensions::RegisterChromeManifestHandlers(); 167 extensions::RegisterChromeManifestHandlers();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 bool parse_success = reader.Init(); 556 bool parse_success = reader.Init();
553 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( 557 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished(
554 parse_success, 558 parse_success,
555 reader.albums(), 559 reader.albums(),
556 reader.folders())); 560 reader.folders()));
557 ReleaseProcessIfNeeded(); 561 ReleaseProcessIfNeeded();
558 } 562 }
559 #endif // defined(OS_WIN) || defined(OS_MACOSX) 563 #endif // defined(OS_WIN) || defined(OS_MACOSX)
560 564
561 } // namespace chrome 565 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698