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

Side by Side Diff: content/browser/intents/intent_injector.cc

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 "content/browser/intents/intent_injector.h" 5 #include "content/browser/intents/intent_injector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 (source_intent_->data_type == webkit_glue::WebIntentData::MIME_TYPE && 85 (source_intent_->data_type == webkit_glue::WebIntentData::MIME_TYPE &&
86 !source_intent_->blob_file.empty())) { 86 !source_intent_->blob_file.empty())) {
87 const int child_id = render_view_host->GetProcess()->GetID(); 87 const int child_id = render_view_host->GetProcess()->GetID();
88 ChildProcessSecurityPolicy* policy = 88 ChildProcessSecurityPolicy* policy =
89 ChildProcessSecurityPolicy::GetInstance(); 89 ChildProcessSecurityPolicy::GetInstance();
90 if (!policy->CanReadFile(child_id, source_intent_->blob_file)) 90 if (!policy->CanReadFile(child_id, source_intent_->blob_file))
91 policy->GrantReadFile(child_id, source_intent_->blob_file); 91 policy->GrantReadFile(child_id, source_intent_->blob_file);
92 } else if (source_intent_->data_type == 92 } else if (source_intent_->data_type ==
93 webkit_glue::WebIntentData::FILESYSTEM) { 93 webkit_glue::WebIntentData::FILESYSTEM) {
94 const int child_id = render_view_host->GetProcess()->GetID(); 94 const int child_id = render_view_host->GetProcess()->GetID();
95 FilePath path; 95 base::FilePath path;
96 const bool valid = 96 const bool valid =
97 fileapi::IsolatedContext::GetInstance()->GetRegisteredPath( 97 fileapi::IsolatedContext::GetInstance()->GetRegisteredPath(
98 source_intent_->filesystem_id, &path); 98 source_intent_->filesystem_id, &path);
99 DCHECK(valid); 99 DCHECK(valid);
100 ChildProcessSecurityPolicy* policy = 100 ChildProcessSecurityPolicy* policy =
101 ChildProcessSecurityPolicy::GetInstance(); 101 ChildProcessSecurityPolicy::GetInstance();
102 if (!policy->CanReadFile(child_id, path)) 102 if (!policy->CanReadFile(child_id, path))
103 policy->GrantReadFile(child_id, path); 103 policy->GrantReadFile(child_id, path);
104 policy->GrantReadFileSystem(child_id, source_intent_->filesystem_id); 104 policy->GrantReadFileSystem(child_id, source_intent_->filesystem_id);
105 } 105 }
(...skipping 15 matching lines...) Expand all
121 if (!intents_dispatcher_) 121 if (!intents_dispatcher_)
122 return; 122 return;
123 123
124 // Ensure SendReplyMessage is only called once. 124 // Ensure SendReplyMessage is only called once.
125 WebIntentsDispatcher* intents_dispatcher = intents_dispatcher_; 125 WebIntentsDispatcher* intents_dispatcher = intents_dispatcher_;
126 intents_dispatcher_ = NULL; 126 intents_dispatcher_ = NULL;
127 intents_dispatcher->SendReply(reply); 127 intents_dispatcher->SendReply(reply);
128 } 128 }
129 129
130 } // namespace content 130 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_unittest.cc ('k') | content/browser/intents/web_intents_dispatcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698