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

Side by Side Diff: chrome/browser/ui/metro_pin_tab_helper_win.cc

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (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/browser/ui/metro_pin_tab_helper_win.h" 5 #include "chrome/browser/ui/metro_pin_tab_helper_win.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return UTF8ToUTF16(hash_str); 50 return UTF8ToUTF16(hash_str);
51 } 51 }
52 52
53 // Get the path of the directory to store the tile logos in. 53 // Get the path of the directory to store the tile logos in.
54 base::FilePath GetTileImagesDir() { 54 base::FilePath GetTileImagesDir() {
55 base::FilePath tile_images_dir; 55 base::FilePath tile_images_dir;
56 if (!PathService::Get(chrome::DIR_USER_DATA, &tile_images_dir)) 56 if (!PathService::Get(chrome::DIR_USER_DATA, &tile_images_dir))
57 return base::FilePath(); 57 return base::FilePath();
58 58
59 tile_images_dir = tile_images_dir.Append(L"TileImages"); 59 tile_images_dir = tile_images_dir.Append(L"TileImages");
60 if (!file_util::DirectoryExists(tile_images_dir) && 60 if (!base::DirectoryExists(tile_images_dir) &&
61 !file_util::CreateDirectory(tile_images_dir)) 61 !file_util::CreateDirectory(tile_images_dir))
62 return base::FilePath(); 62 return base::FilePath();
63 63
64 return tile_images_dir; 64 return tile_images_dir;
65 } 65 }
66 66
67 // For the given |image| and |tile_id|, try to create a site specific logo in 67 // For the given |image| and |tile_id|, try to create a site specific logo in
68 // |logo_dir|. The path of any created logo is returned in |logo_path|. Return 68 // |logo_dir|. The path of any created logo is returned in |logo_path|. Return
69 // value indicates whether a site specific logo was created. 69 // value indicates whether a site specific logo was created.
70 bool CreateSiteSpecificLogo(const SkBitmap& bitmap, 70 bool CreateSiteSpecificLogo(const SkBitmap& bitmap,
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 454
455 GURL url = web_contents()->GetURL(); 455 GURL url = web_contents()->GetURL();
456 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); 456 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec()));
457 metro_un_pin_from_start_screen(tile_id, 457 metro_un_pin_from_start_screen(tile_id,
458 base::Bind(&PinPageReportUmaCallback)); 458 base::Bind(&PinPageReportUmaCallback));
459 } 459 }
460 460
461 void MetroPinTabHelper::FaviconDownloaderFinished() { 461 void MetroPinTabHelper::FaviconDownloaderFinished() {
462 favicon_chooser_.reset(); 462 favicon_chooser_.reset();
463 } 463 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl.cc ('k') | chrome/browser/user_style_sheet_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698