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

Side by Side Diff: components/browser_context_keyed_service/browser_context_dependency_manager.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "components/browser_context_keyed_service/browser_context_dependency_ma nager.h" 5 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 content::BrowserContext* context) { 167 content::BrowserContext* context) {
168 // Whenever we try to build a destruction ordering, we should also dump a 168 // Whenever we try to build a destruction ordering, we should also dump a
169 // dependency graph to "/path/to/context/context-dependencies.dot". 169 // dependency graph to "/path/to/context/context-dependencies.dot".
170 if (CommandLine::ForCurrentProcess()->HasSwitch( 170 if (CommandLine::ForCurrentProcess()->HasSwitch(
171 kDumpBrowserContextDependencyGraphFlag)) { 171 kDumpBrowserContextDependencyGraphFlag)) {
172 base::FilePath dot_file = 172 base::FilePath dot_file =
173 context->GetPath().AppendASCII("browser-context-dependencies.dot"); 173 context->GetPath().AppendASCII("browser-context-dependencies.dot");
174 std::string contents = dependency_graph_.DumpAsGraphviz( 174 std::string contents = dependency_graph_.DumpAsGraphviz(
175 "BrowserContext", 175 "BrowserContext",
176 base::Bind(&BrowserContextKeyedBaseFactoryGetNodeName)); 176 base::Bind(&BrowserContextKeyedBaseFactoryGetNodeName));
177 file_util::WriteFile(dot_file, contents.c_str(), contents.size()); 177 base::WriteFile(dot_file, contents.c_str(), contents.size());
178 } 178 }
179 } 179 }
180 #endif // NDEBUG 180 #endif // NDEBUG
OLDNEW
« no previous file with comments | « components/autofill/core/browser/data_driven_test.cc ('k') | components/nacl/browser/nacl_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698